my %hash2=( a => "apple", b => "boy", c => "cat" ); print "\n$hash2{$_}" for (sort keys %hash2);