in reply to why does push not default to $_?

Well, I think print and push are different in that when you see:
print;
it feels like you want to print something, that thing being directly related to the context (default arg) makes sense. on the other hand:
push @a;
feels like we want to push @a to some place... like a stack. If there was a default stack than the right action would be to push @a to the default stack. So, I guess it is more about linguistics than implementation,

Replies are listed 'Best First'.
Re^2: why does push not default to $_?
by plobsing (Friar) on Dec 06, 2008 at 09:35 UTC

    There is a default stack. At least according to shift and pop.

    Making 1-arg push (and unshift) work with @_ (or @ARGV) as a default 1st arg would, IMHO, be more consistent (I have accidentally expected this behaviour once). Unfortunately, its not terribly useful. I don't find myself adding to @_ frequently.

      It's not a good idea. The only thing you could push onto the "stack" is would be the contents of an array. For example, you can't make push $foo; work without breaking push @foo, $x;. The usefulness of the feature is just too limited to compensate for the confusion the its implementation would cause.