in reply to using hash values inside an array.
Or just replace (keys %coords) with the list of whatever values you want. For example:my @xcoords = map { $coords{$_}[0] } (keys %coords
(The 'qw' is necessary, otherwise Perl will convert "062" into "62," which isn't What You Want.)my @xcoords = map { $coords{$_}[0] } qw(061 062);
Or, as someone else suggested, just use the values instead of the keys:
HTHmy @xcoords = map { $_->[0] } (values %coords);
|
|---|