Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi --
I was wondering if perl has a throw-away variable so that I can toss unwanted values in list assignment, e.g.,
my ($x, $_, $z) = split(",",",'7,8,9');
The above almost works, except, I am cautious about assignment to $_, and I am wondering what it means if I declare $_ to be my-scoped.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl equivalent of python's underscore?
by BrowserUk (Patriarch) on Oct 27, 2010 at 15:57 UTC | |
|
Re: perl equivalent of python's underscore?
by toolic (Bishop) on Oct 27, 2010 at 16:18 UTC | |
|
Re: perl equivalent of python's underscore?
by ig (Vicar) on Oct 27, 2010 at 16:28 UTC | |
|
Re: perl equivalent of python's underscore?
by mojotoad (Monsignor) on Oct 28, 2010 at 07:44 UTC |