Package: perl-doc
Version: 5.18.1-4
Severity: wishlist
File: /usr/share/man/man1/perlref.1.gz

man perlref is missing critical mention of how to combine $$ and $#:

$ perl -lwe 'use strict; my @m=1..11; my $arrayref  = \@m; print $#m; print 
$#$arrayref'
10
10

By the way, curious as to where $# itself is documented, on man perlvar we see

               ...not the sigil you use in front of an array name to get
               the last index, like $#array.  That's still how you get the
               last index of an array in Perl...

but apparently no better mention in all of the perl man pages.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to