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
In Section
Seekers of Perl Wisdom