Help for this page

Select Code to Download


  1. or download this
    $a[-1]  # last element
    $a[-2]  # second-last element
    
  2. or download this
    @a[-2, -1]  # second-last and last element
    
  3. or download this
    >perl -E"@a = qw( a b c d e f ); say for @a[4..-1]"
    
    ...
    f
    e
    d