Re: proposed addition to perlvar

[email protected] ("Chas. Owens")
Newsgroups perl.perl5.porters
Message-ID <[email protected]>
On Wed, Jun 9, 2010 at 11:30, Chas. Owens <[email protected]> wrote:
snip
> Ignore the last patch, the example was overcomplicated.  I have changed it to
snip

And ignore that too (it wasn't a patch).  Hopefully I am awake now.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
perlvar.patch (application/octet-stream, 1.1 KB)
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index ed90610..24169ab 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -1629,6 +1629,40 @@ L<warnings> for additional information.
 
 =back
 
+=head2 Deprecated Names
+
+=over 8
+
+=item $#
+
+C<$#> used to be a variable that could be used to format printed number.
+After a deprecation cycle, its magic was removed in 5.10 and using it
+now triggers a severe warning: C<$# is no longer supported>.
+
+C<$#> is also used as sigil, which, when prepended on the name of an
+array gives the index of the last element in that array.
+
+    my @array        = ("a", "b", "c");
+    my $last_index   = $#a;     # $last_index is 2
+
+    for my $i (0 .. $#array) {
+        print "the value at index $i is '$array[$i]'\n";
+    }
+
+Also see L<perldata>.
+
+=item $*
+
+C<$*> used to be a variable that enabled multiline matching.
+After a deprecated cycle, its magic was removed in 5.10.
+Using it now triggers a severe warning: C<$* is no longer
+supported>.  Use the C</s> and C</m> regexp modifiers
+instead.
+
+Also see L<perlre>.
+
+=back
+
 =head2 Error Indicators
 X<error> X<exception>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.