use strict; use warnings; my @input = ; chomp @input; my ($max, $s_max) = sort { $b<=>$a} @input; print $max,$",$s_max,$/; __DATA__ 0.2430 0.0830 0.1320 0.0920 0.0180 0.0880 0.3440