in reply to Re^3: How can I avoid code repetition here
in thread How can I avoid code repetition here

Which Perl version was this introduce in? I still used 5.8.8, so it was illegal there. I see that it works in 5.10

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^5: How can I avoid code repetition here
by JavaFan (Canon) on Oct 08, 2009 at 11:45 UTC
    5.10. Which was released about 22 months ago. You shouldn't be claiming things are not allowed if all you do is check it against an old version of Perl.

      Honestly I had not expected that this would ever become valid, and I'm still puzzled how this can work, i.e. how a builtin function (like chop) can modify *any* localized variable by name...

      -- 
      Ronald Fischer <ynnor@mm.st>
        All what's happening is an implicite passing of $_. But passing $_ isn't any different from passing $str. And you do believe that my $str = "..."; chop $str modifies the lexical (I guess you meant lexical variable where you write localized variable) variable, don't you?