Your list of numbers is a list; the problem is that pop is the source of the surrounding context and provides a scalar one. If you check the prototype, pop is ";+" and + is a bit weird. Thus quoth perlsub:
The "+" prototype is a special alternative to "$" that will act li +ke "\[@%]" when given a literal array or hash variable, but will othe +rwise force scalar context on the argument. This is useful for functions + which should accept either a literal array or an array reference as the argument:
Update: Tweaked formatting.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: passing an array without a name to pop()
by Fletch
in thread passing an array without a name to pop()
by TieUpYourCamel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |