Help for this page

Select Code to Download


  1. or download this
    $ perl -e 'my @arr=(1,2,3); $arr[-1]=4; print join " ", @arr, "\n";'
    1 2 4
    $
    
  2. or download this
    $ perl -e 'my @arr; $arr[-1]=4; print join " ", @arr, "\n";'
    Modification of non-creatable array value attempted, subscript -1 at -
    +e line 1.
    $