Relevant to the functionality but not to the OP's question:
Built-in variable $. is the number of lines read from the current (i.e. last-read) file handle. So:
while ( <> ) { last if m/perl/i; } print "There were $. lines until I found perl\n";
In reply to Re: mixed case with match
by Anonymous Monk
in thread mixed case with match
by catfish1116
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |