in reply to Re^2: Missing $ on loop variable
in thread Missing $ on loop variable
foreach (@keywords) { push @found, $_ if $line =~ m/$_/i; }
next is not really useful, and dare i say obsolete, since there is no other code aside the regexp conditional in the foreach block. As for the grep rewrite, there is a gotcha, which might complicate things in certain situations. But i'll save it for another day since it isn't relevant to this thread. But if anyone is interested take a look here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Missing $ on loop variable
by revdiablo (Prior) on Dec 03, 2005 at 02:32 UTC | |
by psychotic (Beadle) on Dec 03, 2005 at 14:39 UTC | |
by revdiablo (Prior) on Dec 03, 2005 at 19:27 UTC |