in reply to Re^4: I can't see why this shorthand doesn't behave like the verbose form
in thread I can't see why this shorthand doesn't behave like the verbose form
:) I wonder what happens when you get rid of them
$ perl -le " eval my $foo = 1; " Can't modify eval "string" in scalar assignment at -e line 1, near "1; +" Execution of -e aborted due to compilation errors. $ perl -MO=Deparse,-p -le " eval my $foo = 1; " Can't modify eval "string" in scalar assignment at -e line 1, near "1; +" -e had compilation errors. BEGIN { $/ = "\n"; $\ = "\n"; } (eval(my $foo) = 1); $ perl -le " eval( my $foo = 1;) " syntax error at -e line 1, near "1;" Execution of -e aborted due to compilation errors. $ perl -le " eval( my $foo = 1) " $ perl -le " eval( my $foo = q/print 666/ ) " 666
Uh oh :)
|
|---|