http://www.perlmonks.org?node_id=946613


in reply to Is this normal

If you want the match to return 1 if successful, and 0 if it fails, you can use the ternary operator:
&TestIt($a1,$a2, ($a3 =~ m/2/) ? 1 : 0 ,$a4);