Help for this page

Select Code to Download


  1. or download this
    $ perl -wle'$[ = -3; $_ = "abcdef"; print substr($_,0,1)'
    Use of assignment to $[ is deprecated at -e line 1.
    d
    
  2. or download this
    $ perl -we'$[ = 3; $_ = "abc"; my $x = substr($_,2,1)'
    panic: sv_setpvn called with negative strlen at -e line 1.
    
  3. or download this
    $ 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.