in reply to Re^2: Curious result of using "my ... if ..."
in thread Curious result of using "my ... if ..."

In my opinion, the sensible behavior, and what most people expect when they use it, is that it would operate the same as if the my($x) was on a separate line. If that isn't possible, it should throw an error.
  • Comment on Re^3: Curious result of using "my ... if ..."

Replies are listed 'Best First'.
Re^4: Curious result of using "my ... if ..."
by jrw (Monk) on May 17, 2007 at 22:58 UTC
    I agree with you. There are two logical choices: either it should work as you suggest or it should be disallowed by the compiler. But the actual implementation makes no sense whatsoever to me.