in reply to Why is this not finding my array value.

$#a1 is the index of the last element in the array @a1. To access the array referred to by $a1, you use additional syntax with that variable. For example:
$idx = $#{$a1}; # index of last element $idx = $#$a1; # same $count = @{$a1}; # number of elements $count = @$a1; # same $item = $a1->[1]; # element 1 $item = ${$a1}[1]; # same @slice = @{$a1}[0, 1]; # slice of elements
For more on using references, check out perlreftut (reference tutorial - offsite link), perlref (reference reference), perllol (lists of lists), and perldsc (data structures cookbook).

Replies are listed 'Best First'.
Re: Re: Why is this not finding my array value.
by basicdez (Pilgrim) on Jan 19, 2001 at 21:36 UTC
    Thanks I got it working now. peace dez