> that _ is already a valid character in prototypes for a scalar argument defaulting to $_, as you want.
well, couldn't find it in the docs perlsub ... ups ...I was scanning the text und examining the examples and tables, but after a textsearch for "_" there is a somehow hidden phrase:
As the last character of a prototype, or just before a semicolon, you can use _ in place of $ : if this argument is not provided, $_ will be used instead.
wow, it's already implemented!
So its possible to override CORE::push with sub push(\@_;@), which will default to $_ if the list is omitted!
That means there is no technical reason that it's not already implemented this way, it's just Larry's decission.
UPDATE Thats wrong, see following post...
This thread is really instructive ... thanx! : )
Cheers Rolf
In reply to Re^4: why does push not default to $_? (simple)
by LanX
in thread why does push not default to $_?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |