... pass an anonymous empty array to a subroutine:
&foo(qw());
A bit OT: I would say a better (because simpler) way to do this would be:
foo();
What would be the purpose of the empty qw() call?
BTW: I would also advise against using & sigils for function calls in "modern" (i.e., post-4.xx version) Perl code; they will usually do no harm, but may introduce subtle bugs in certain cases (usually involving Prototypes — but let's just not involve prototypes!).
Give a man a fish: <%-(-(-(-<
In reply to Re: passing anonymous empty array reference to subroutine
by AnomalousMonk
in thread passing anonymous empty array reference to subroutine
by Special_K
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |