Help for this page
# declare a subroutine # takes two strings as arguments ... # newlines are removed from each element of the array chomp @{$a_ref}; }
my($ref) = \@array; my($file) = '/usr/dict/words'; ... # $ref now contains a reference to an array which contains # all the words in /usr/dict/words, with the newlines # removed.