But note that I would avoid this with large arrays unless you are on 5.6.1 or better.my %hash2 = map {defined($hash1{$_}) ? ($_ => $hash1{$_}) : ()} @ary;
In reply to Re (tilly) 1: Mapping array over a hash
by tilly
in thread Mapping array over a hash
by agoth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |