for my $i ( 0 .. $#array ) { next unless $array[$i]->{ServiceType} eq 'FEDEX_2_DAY'; print $array[$i]->{ship_cost} and last; }