##
$ perl -we'$[ = 3; $_ = "abc"; my $x = substr($_,2,1)'
panic: sv_setpvn called with negative strlen at -e line 1.
##
##
$ perl -we'$[ = 3; $_ = "abc"; my $x = substr($_,2,1)'
Use of assignment to $[ is deprecated at -e line 1.
substr outside of string at -e line 1.