Proposed patch to perlvar.pod
[email protected] ("A. Sinan Unur")
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
Hello: There was recent discussion on Stackoverflow.com regarding where to find documentation for $# (see http://stackoverflow.com/questions/2997042/ ). The poster was actually looking for information regarding the $#ary to get the last index of @ary. He expected the documentation to be in perlvar.pod when it actually is in perldata.pod. Given that the builtin variable $# was removed with 5.10.0, there no longer is an entry in perlvar.pod for $#. The attached patch inserts an entry into perlvar.pod for $# which points out that $# no longer exists and the user should consult perldata.pod for the $#ary usage. The patch file was generated on a Windows system from blead. I am afraid permissions may have been messed up. Thank you for your attention. Sinan -- A. Sinan Unur http://www.unur.com/sinan/
0001-It-may-not-be-obvious-to-a-new-Perl-programmer-that-.patch
(application/octet-stream, 996 B)
From 09b9d7bc8167d94e09088167cdea43750c337f80 Mon Sep 17 00:00:00 2001 From: Sinan Unur <[email protected]> Date: Tue, 8 Jun 2010 18:53:27 -0400 Subject: [PATCH] It may not be obvious to a new Perl programmer that $#ary is explained in perldata.pod (see http://stackoverflow.com/questions/2997042/ ). A possible solution is to place an entry in perlvar.pod pointing out that $# was removed and pointing the user to perldata.pod for the explanation of $#ary usage. --- pod/perlvar.pod | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/pod/perlvar.pod b/pod/perlvar.pod index ed90610..539cc2c 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -553,6 +553,11 @@ taken for something more important.) Consider using "real" multidimensional arrays as described in L<perllol>. +=item $# +X<$#> + +C<$#> was removed in Perl 5.10.0. See L<perldata/"Variable names"> for C<$#ary> usage. + =item HANDLE->format_page_number(EXPR) =item $FORMAT_PAGE_NUMBER -- 1.7.0.4