in reply to Re: don't get bit by split.
in thread @arrys & Non exact searches.
Instead of this:
this will get just the indexes:my @matches = grep { /$pattern/ } @names;
my @matches = grep { $names[$_] =~ /$pattern/ } 0..$#names;
|
---|
In Section
Seekers of Perl Wisdom