C:\@Work\Perl>perl -wMstrict -e "my %h = qw(a 1 b 2 c 3 d 4); my @not_wanted = qw(b d); my %wanted = %h; delete @wanted{ @not_wanted }; print qq(key $_ => value $wanted{$_} \n) for keys %wanted" Outputs: key c => value 3 key a => value 1
In reply to Re: Selecting a Specific Keys in Relation to a List
by Anonymous Monk
in thread Selecting a Specific Keys in Relation to a List
by awohld
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |