Do you know where your variables are? | |
PerlMonks |
Re: why does push not default to $_?by perreal (Monk) |
on Dec 06, 2008 at 03:00 UTC ( [id://728474]=note: print w/replies, xml ) | Need Help?? |
Well, I think print and push are different in that
when you see:
it feels like you want to print something, that thing being directly related to the context (default arg) makes sense. on the other hand: 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,
In Section
Seekers of Perl Wisdom
|
|