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.
In reply to Re: Re: When does while set $_ ?
by jmcnamara
in thread When does while set $_ ?
by crenz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |