If push @a; were currently a syntax error, then it would make sense for it to mean push @a, $_; because doing something useful is better than a compilation error. But push @a; isn't a syntax error — it actually does do something — it pushes the empty list onto the array.
Pushing an empty list might seem like a no-op which could never be useful, but if you think that, you're forgetting about tied arrays.
In reply to Re: Why doesn't Perl default (more)
by tobyink
in thread Why doesn't Perl default (more)
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |