1 2 3 4
my $min_dist_old_to_new = 1; foreach my $curr_dists (values %dists) { $min_dist_old_to_new = min($min_dist_old_to_new, $$curr_dists[0]); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#! /usr/bin/perl use strict; use warnings; use List::Util qw( min ); my %hash = ( 't1' => [0.5, 0.8], 't2' => [0.6, 0.9], 't5' => [0.4, 0.2], ); my $min = min map { $hash{$_}->[0] } keys %hash; print "Min: $min\n";