in reply to "my $p = value if condition()" as bad|deprecated as "my $p if 0" (Naughty indeed)

Yes, the construct you show is a problem and should definitely be replaced in all code where you've used it. It can create a static variable that will not change its value when condition() returns different results.
  • Comment on Re: "my $p = value if condition()" as bad|deprecated as "my $p if 0"