Hi, <br><br>What would $1 be when there is no match found?<br>How to detect failed pattern matches?<br><br>I want the program exit code to reflect the fact whether the pattern has been found or not. <br>I tried to detect undef or empty string '', but all seemed doesn't work for me. <br>
<br> $ret = $1;<br> exit (defined($ret) ? 0 : 1);<br>
exit (defined($1) ? 0 : 1);<br><br>Please help. <br>Thanks<br><br>Antonio<br><br>