in reply to A C-like brain in a Perl-like world
The double-curlies are necessary - with single-curlies the interpreter whines and dies. If anyone can explain why, I'd be interested.my @merged = values %{{ map {$_ => $_ } @array1,@array2 }} ;
andy.
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) Re: one-liner to merge arrays
by jeffa (Bishop) on Sep 27, 2001 at 23:25 UTC | |
Re: one-liner to merge arrays (Re: A C-like brain in a Perl-like world)
by extremely (Priest) on Sep 27, 2001 at 23:42 UTC | |
by andye (Curate) on Sep 28, 2001 at 15:09 UTC |
In Section
Seekers of Perl Wisdom