perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

[doc] Wrong variable name in example

Open poti1 opened this issue 8 months ago • 3 comments

Where

Right before the start of:

https://perldoc.perl.org/perlretut#Using-independent-subexpressions-to-prevent-backtracking

Description $count2 is referenced in the example, but only once:

$count{lc($_)}++ for split('', "supercalifragilisticexpialidocious");
printf "%3d '%s'\n", $count2{$_}, $_ for ( qw{ a e i o u } );

Since this is the 2nd example, I figured the first line would refer to $count2 or the 2nd would remain as $count.

poti1 avatar Jun 08 '24 14:06 poti1