diff options
author | Ricardo Signes <rjbs@cpan.org> | 2012-05-20 08:35:04 -0400 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-05-20 08:35:04 -0400 |
commit | 5bbddb3107caeabc49fafc882f7b50e41274fd91 (patch) | |
tree | 32a3733520a5e002970426c478c7969200d9bfc5 | |
parent | 2e85f27811e17c0360d5f88f5276a874a1f361db (diff) | |
download | perl-5bbddb3107caeabc49fafc882f7b50e41274fd91.tar.gz |
perldelta: fix the example of lvalue ref from substr
reported by Shlomi Fish
-rw-r--r-- | pod/perldelta.pod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 4ea10e63d2..3b26bf5c1e 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -116,9 +116,9 @@ their position from the end of the string, affecting code like this: my $string = "string"; my $lvalue = \substr $string, -4, 2; - print $lvalue, "\n"; # prints "ri" + print $$lvalue, "\n"; # prints "ri" $string = "bailing twine"; - print $lvalue, "\n"; # prints "wi"; used to print "il" + print $$lvalue, "\n"; # prints "wi"; used to print "il" The same thing happens with an omitted third argument. The returned lvalue will always extend to the end of the string, even if the string |