in reply to Re^2: qr/string/ is not the same as qr/$var/ ?
in thread qr/string/ is not the same as qr/$var/ ?
That's a surprising loophole, since perl is aware of the danger of runtime evaluation of a regexp with an eval group:
% perl -e '/$ARGV[0]/' '(?{print "nasty\n"})' Eval-group not allowed at runtime, use re 'eval' in regex m/(?{print " +nasty\n"})/ at -e line 1. % perl -e 'eval qq(/$ARGV[0]/)' '(?{print "nasty\n"})' nasty
the lowliest monk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: qr/string/ is not the same as qr/$var/ ?
by Roy Johnson (Monsignor) on Apr 20, 2005 at 20:25 UTC |