in reply to Re^3: shift vs @_
in thread shift vs @_
But it doesn't prevent me from being human and making a mistake.
Ok, firstly, you said that you can't easily do what you wanted, not that it was easy to make a mistake.
Secondly, attempting my $x, $y = @_ with strict in place (which is best practice anyhow) produces:
Which would be a pretty big clue to me that something was wrong (you aren't creating a lexical $y with my $x, $y). Doing the same thing with warnings turned on (another best practice) results in:Global symbol "$y" requires explicit package name
Parentheses missing around "my" list
I'd say that pretty well prevents you from making this mistake, anyhow.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: shift vs @_
by exussum0 (Vicar) on Oct 06, 2006 at 20:01 UTC |