This uses the map operator to create a hash, and then we extract the keys from this hash to an array.my @a1 = qw(one two three); my @a2 = qw(one five four); my %h = map { $_ => 1 } (@a1, @a2); my @r = keys(%h); print "@r\n";
Michael
In reply to Re: Arrays
by mpeppler
in thread Comparing Two Arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |