in reply to Reading lines and matching words
Your code didn't show a call to a subroutine, so I'm assuming you *really* meant return. As duff said, this is what grep does.if ($line =~ /word1|word2|word3/) { return 1; } else { return 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading lines and matching words
by mantra2006 (Hermit) on Apr 12, 2007 at 12:53 UTC |