http://qs321.pair.com?node_id=11119147


in reply to Perl::Critic says don't modify $_ in list functions and other things

I actually started using Perl::Critic lo these many moons ago when the current Perl was 5.8, because of my $var = "foo" if 'some condition'. My experience was that usually it behaved the way you would expect ($var was undefined if the condition was false). But sometimes it retained whatever the previously-assigned value was.

In general, my feeling about Perl::Critic is that if it flags something, it means someone, somewhere, under some circumstances had trouble with that construct. Maybe those circumstances do not apply to you, and you should not feel guilty about disabling a policy, but you should think first, both about what the policy does in general and whether it applies in your case.