P:\test>perl -l END{ print $] } print $]; use strict; use warnings; my $x=""; foo( substr($x,2,1) ); # crashes here print "Alive!\n"; # not reached sub foo {} ^Z 5.008004 substr outside of string at - line 6. 5.008004 P:\test>c:\perl561\bin\perl5.6.1.exe -l END{ print $] } print $]; use strict; use warnings; my $x=""; foo( substr($x,2,1) ); # crashes here print "Alive!\n"; # not reached sub foo {} ^Z 5.006001 substr outside of string at - line 6. 5.006001 P:\test>