Help for this page

Select Code to Download


  1. or download this
    perl -le"print for @{[1,2,3,4,5,6]}[2..5]"
    perl -le"$_=[1..7];print for @{$_}[-1,-2]"
    
  2. or download this
    # also, to give you some insight
    perl -le"@_=(1..7);print for $_[-1,-2]"
    ...
    foreach $_ (@$_[-1, -2]) {
        print $_;
    }