Skip to content

Commit

Permalink
$# and $* throw a compilation error, not a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
book committed Jul 13, 2024
1 parent c2b9cbd commit 71eb28d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pod/perlvar.pod
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@ X<$#>

C<$#> was a variable that could be used to format printed numbers.
After a deprecation cycle, its magic was removed in Perl v5.10.0 and
using it now triggers a warning: C<$# is no longer supported>.
using it now triggers a compilation error: C<$# is no longer supported>.

This is not the sigil you use in front of an array name to get the
last index, like C<$#array>. That's still how you get the last index
Expand All @@ -2641,7 +2641,7 @@ X<$*>

C<$*> was a variable that you could use to enable multiline matching.
After a deprecation cycle, its magic was removed in Perl v5.10.0.
Using it now triggers a warning: C<$* is no longer supported>.
Using it now triggers a compilation error: C<$* is no longer supported>.
You should use the C</s> and C</m> regexp modifiers instead.

Deprecated in Perl 5.
Expand Down

0 comments on commit 71eb28d

Please sign in to comment.