http://qs1969.pair.com?node_id=66075


in reply to Re: don't get bit by split.
in thread @arrys & Non exact searches.

Replace your grep line with this:

my @matches = grep { $names[$i] =~ /$pattern/ } 0 .. $#names;
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me