Line 152:
Line 152:
You can do various useful things to lists:
You can do various useful things to lists:
−
my @sorted = sort @animals;
+
my @sorted = [http://perldoc.perl.org/functions/sort.html sort] @animals;
−
my @backwards = reverse @numbers;
+
my @backwards = [http://perldoc.perl.org/functions/reverse.html reverse] @numbers;
There are a couple of special arrays too, such as '''@ARGV''' (the command line arguments to your script) and '''@_''' (the arguments passed to a subroutine). These are documented in [http://perldoc.perl.org/perlvar.html perlvar].
There are a couple of special arrays too, such as '''@ARGV''' (the command line arguments to your script) and '''@_''' (the arguments passed to a subroutine). These are documented in [http://perldoc.perl.org/perlvar.html perlvar].