# But I'm not a golfer. use strict; use warnings; sub test { my ($m, $line) = (undef, 0); while ( <DATA> ) { $line++; last if (($m) = m/(perl)/i); } if ($m) { printf "There were %d lines until I found '%s'\n", $line, $m; } else { printf "I never found 'perl' in %d lines\n", $line; } } test test __END__ 1 2 3 This is peRl ok 1 2 3
In reply to Re: mixed case with match
by gam3
in thread mixed case with match
by catfish1116
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |