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

The warning is new, but the behaviour of my $p = $q if condition(); has always been officially undefined. It shouldn't be used.
  • Comment on Re: "my $p = value if condition()" as bad|deprecated as "my $p if 0"
  • Download Code

Replies are listed 'Best First'.
Re^2: "my $p = value if condition()" as bad|deprecated as "my $p if 0"
by parv (Parson) on Jan 15, 2008 at 05:15 UTC

    Thanks ikegami.

    Few hours ago I failed to find a reference as I focused on the deprecated warning. Now I see that it is clearly stated in perlsyn near the end of Statement Modifiers section. I suppose that is an indication to re-read the fine manuals.