Actually that was one of my first questions here.
(EDIT found it: why does push not default to $_?)
My guess is that it's because it's taking multiple args via push @a, LIST , and not a single one push @a, EXPR °
> allowing code to be more concise, succinct, and economical.
Nah, that's not true, because the defaults in Perl are not orthogonal.
You have to check for every operator and built-in how it's implemented.
especially the scalar behavior is very diverse.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) While it's still technically possible, this might be logically to confusing.
And symmetry would require a void ;shift or ;pop to automatically set $_ , which would most certainly break things!
In reply to Re: Why doesn't Perl default (edited)
by LanX
in thread Why doesn't Perl default (more)
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |