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

It looks like a bug to me, somehow related to qw, not the prototype. You can supply a list as an argument, just not one generated by qw.

map2{ print $a $b; } 'A', 'B', 'C', 'D'; #works fine! map2{ print $a $b; } map {$_} qw{A B C D}; #works map2{ print $a $b; } qw{A B C D}; #doesn't compile (as you said)

I don't know if this is ActiveState specific or 5.6 specific - the only 5.6 I have is ActiveState

Replies are listed 'Best First'.
Re: Re: Problem emulating built-ins like map and grep.
by crouchingpenguin (Priest) on Jan 22, 2003 at 02:23 UTC
    Not a 5.6 (at least not a debian woody 5.6.1 problem) problem:

    ii perl 5.6.1-8.2 Larry Wall's Practical Extraction and Report Language.

    Works both ways.

    "Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."