in reply to What is the scope of $_?
To make things even more interesting, given creates a new lexical $_:
$ perl -wE '$_ = 1; sub p { say }; given (42) { say; p }' 42 1
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What is the scope of $_?
by Tanktalus (Canon) on Nov 26, 2012 at 17:53 UTC |
In Section
Seekers of Perl Wisdom