- or download this
mysub(@a);
- or download this
mysub($a[0], $a[1], $a[2], ...);
- or download this
sub sortArray {
return sort @_;
...
# Same thing.
my @sorted = sortArray('e', 'd', 'c', 'b', 'a');
print("@sorted\n"); # a b c d e
- or download this
sub sortArray {
my ($ar) = @_;
...
my @a = qw( e d c b a );
sortArray(\@a);
print("@a\n"); # a b c d e