in reply to Problem emulating built-ins like map and grep.

Check out Far More Than Everything You've Ever Wanted to Know About Prototypes by Tom Christiansen.

It's a known misfeature that you can only pass a real array to &@, not a list of parameters.

Replies are listed 'Best First'.
Re^2: Problem emulating built-ins like map and grep.
by Aristotle (Chancellor) on Jan 22, 2003 at 14:41 UTC
    Wrong. You're talking about the \@ prototype, which makes Perl insist on seeing a @ sigil, and automatically takes a reference to that array before passing it to the function. You can still pass in lists by way of a construct like @{[foo_list()]}. It's exactly the same situation as with push et al.

    Makeshifts last the longest.