in reply to Merging Arrays without duplicates
If the answer to the first question is "no" or if the answer to the second one is "yes", this will work:
my @merged = sort { $a <=> $b } keys %{ { map { $_ => 1 } } } @A, @B;
If order isn't an issue simply remove the sort { $a <=> $b } bit.
|
|---|