Probably PC's just not smart enough to tell that you've explicitly localized $_ there. If you absolutely have to get rid of the complaint you could always change it to use a lexical and explicit binds (I sometimes use something along the lines of map { ( my $t = $_ ) =~ s/foo/bar/; $t } @xs).
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: PerlCritic, $_ and map
by Fletch
in thread PerlCritic, $_ and map
by chexmix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |