http://qs321.pair.com?node_id=66070


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

Instead of this:
my @matches = grep { /$pattern/ } @names;
this will get just the indexes:
my @matches = grep { $names[$_] =~ /$pattern/ } 0..$#names;