Bruno Veldeman wrote:
> 
> And another thing:
> > print $dirs[$#dirs];

@list = ('one', 'two', 'three', 'four');
print $#list;

the output would be

3

$#somelist returns the last element number of an array.  note this is
the element number, which starts at 0.  to get the number of variables
in the array, use scalar():

print "$#list\n";
print scalar(@list);

would return

3
4

Reply via email to