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

It's a parsing issue. You'll find this works:
map2 sub { print "$a $b" }, qw[A B C D];
Update:
$ perl -v

This is perl, v5.6.1 built for i386-linux

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Problem emulating built-ins like map and grep.
by jsprat (Curate) on Jan 22, 2003 at 18:50 UTC
    With ActiveState Perl 5.6.1 build 633 on Win2K, this doesn't work. It compiles fine, but map2 just receives an empty list as the second argument.