The parens around shift are necessary, as you can easily prove if you remove them. I believe perl thinks that shift is the name of a variable, instead of the built-in function. Using strict, I get this compile error:
Global symbol "%shift" requires explicit package name at BEGIN not safe after errors--compilation aborted at
diagnostics gives even more info.
In reply to Re: hash to sub
by toolic
in thread hash to sub
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |