in reply to Keeping order, no duplicate and the complete keyset
my @big = qw(a b c d e f g h i); my @kw= qw(f c d g); my %small = map {$_=>undef} @kw; exists $small{$_} or push @kw,$_ for @big; # or, Alternatively, # push @kw,grep {!exists$small{$_}} @big; print qq(@kw\n); -- Output -- f c d g a b e h i
You're just jealous cause the voices are only talking to me.
No trees were killed in the sending of this message. However, a large number of electrons were terribly inconvenienced.
|
|---|