in reply to Re: $_, one lexical scope removed
in thread $_, one lexical scope removed

Are you trying to win an obfuscated code contest?
Essentially. I'm thinking of writing a paper entitled "Monads for Perl" and I was trying to make my example code as side-effect free as possible.


-- All code is 100% tested and functional unless otherwise noted.

Replies are listed 'Best First'.
Re^3: $_, one lexical scope removed
by revdiablo (Prior) on Jul 15, 2004 at 20:59 UTC
    I was trying to make my example code as side-effect free as possible

    Using $_ doesn't mean your code is side-effect free, just that the side-effects are implicit. This is the reason you should use $_ with caution. It can be a nice way to increase clarity, but as your question ably demonstrates, can often introduce much confusion.