my @foo = qw/a b c/; print "$foo[1]\n"; # Prints b print "@foo\n"; # Prints a b c print "$foo[$#foo]\n"; # Prints c (but you would probably never do this) print "$foo[-1]\n"; # Also prints c (a better way than the previous) print "@foo[0,2]\n"; # Prints a c