"Exiting eval via next" [perl v5.14]

Graham Barr gbarr at pobox.com
Fri Nov 4 20:16:35 GMT 2011


On Nov 4, 2011, at 11:36 , Chisel wrote:
> 
> # why no error?!
> $ perl -M5.14.0 -wle 'for my $i (qw/foo/) { eval { $i.=q{}; next; }; } say
> "done"'
> done

Because the next never happens, check $@ you will see

Modification of a read-only value attempted

Graham.



More information about the london.pm mailing list