You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
362 B
Perl

# $arrayref = \@ARGV;
# $hashref = \%ENV;
# To access an array reference:
# $arrayref = \@ARGV;
# @sorted = sort( @$arrayref );
#!/usr/bin/perl -w
# Reference to an array variable.
@array = ( 'Tom', 'Jack', 'Wilma');
$arrayref = \@array;
@sorted = sort( @$arrayref );
print "Array reference = @sorted\n\n";