It depends what do you mean by maximum. Assume you have numerical value as hash values. You can do: use List::Util qw(max) my %hash = { foo => 3, bar=>2, qux=> 1}; my $max_val = max values %hash; Hope that helps. -- Regards, Edward WIJAYA
________________________________ From: Andrej Kastrin [mailto:[EMAIL PROTECTED] Sent: Mon 10/2/2006 3:52 PM To: beginners perl Subject: Maximum value in Hash Dear all, I'm looking for simple (and fast) solution to extract maximum value from a hash. ------------ Institute For Infocomm Research - Disclaimer ------------- This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you. -------------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>