Name "main::a" used only once: possible typo at ... line ...
- by knorv
When running the following Perl code ...
use Data::Traverse qw(traverse);
use warnings;
my $struct = [ 1, 2, { foo => 42 }, [ 3, 4, [ 5, 6, { bar => 43 } ] ], 7, 8 ];
traverse {
print "$a => $b\n" if /HASH/
} $struct;
... the warning Name "main::[ab]" used only once: possible typo is given.
Since the use of $a and $b is clearly not a typo in this case I want to get rid of the warning. How do I do that while still using warnings?