in reply to Re: When does while set $_ ?
in thread When does while set $_ ?
while (local $_ = match('a')) { print "- $_\n"; }
However, it would be better to use grep() instead of your match() function. Then all of your code could be replaced with the following line: ;-) print "- $_\n" for grep {/a/} @data;
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: When does while set $_ ?
by crenz (Priest) on Aug 01, 2002 at 10:34 UTC |