ChrisS has asked for the wisdom of the Perl Monks concerning the following question:
I would expect the following code to work:
my $op = shift; for (qw(your hand is too cold to hold)) { eval $op; print $_, "\n"; }
If the user invokes the script as follows:
perl test.pl 's/old/new/'
The output is:
your hand is too cold to hold
I would expect the "old"s to be "new"s, and I'm sure I'm making a dumb mistake.
|
|---|