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.
| [reply] |
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.
| [reply] [d/l] [select] |