Bug#722636: mention how to use $# sigil with array references

jidanni at jidanni.org jidanni at jidanni.org
Fri Sep 13 00:23:13 UTC 2013


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.




More information about the Perl-maintainers mailing list