Neater? Eye of the beholder...but it is pretty self explanatory.
my @location_fields = qw( Lat Long Elevation );; my %loc; @loc{ @location_fields } = @london{ @location_fields };; pp \%loc;; { Elevation => 24, Lat => "51\xF830′26″N", Long => "0\xF87′39″W", }
In reply to Re: Slice a hash to get a subset hash.
by BrowserUk
in thread Slice a hash to get a subset hash.
by chrestomanci
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |