is how I'd do it%pets = map { $_ => $hash{$_} } qw( dog cat );
Edit: Got rid of "concise". It did not convey my meaning very well :(
In reply to Re: How to extract part of a hash
by FunkyMonk
in thread How to extract part of a hash
by rhesa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |