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:
Global symbol "$y" requires explicit package name
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:
Parentheses missing around "my" list
I'd say that pretty well prevents you from making this mistake, anyhow.
|