in reply to Re: [perlre] using qr - help needed
in thread [perlre] using qr - help needed
So there the regex will only be compiled once instead for each iteration within the grep. See the perlop|perlop manpage for more info.my $match = shift @ARGV; my @matched = grep /^$match$/o, <>;
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: [perlre] using qr - help needed
by Aristotle (Chancellor) on Nov 08, 2002 at 19:01 UTC |