in reply to Re^2: Assign in loop with and without declaration
in thread Assign in loop with and without declaration

You're not the first to think of warnings:)
Deprecated use of my() in false conditional
  • Comment on Re^3: Assign in loop with and without declaration

Replies are listed 'Best First'.
Re^4: Assign in loop with and without declaration
by andreas1234567 (Vicar) on May 22, 2008 at 10:34 UTC
    Ah.. so a warning was added for perl v5.9.1 (perl591delta), nice.

    Do you think the warning

    "Deprecated use of my() in false conditional"
    should be extended to
    "Deprecated use of my() in false conditional or loop"
    which would then trigger for both of the following cases:
    $ /usr/local/bin/perl5.10.0 -w my $x if 0 __END__ Deprecated use of my() in false conditional at - line 2. $ /usr/local/bin/perl5.10.0 -w my $x = $_ for (1 .. 3); __END__
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
      "Deprecated use of my() in false conditional or loop"

      If such a warning is considered, it would be better phrased as

      "Deprecated use of my() in loop or false conditional"

      Be well,
      rir