http://qs321.pair.com?node_id=988032


in reply to Re: largest number inside array/hash
in thread largest number inside array/hash

Hi Nice elegant solution. but i guess this would work too
#!/usr/bin/perl -w use strict; my @array = ( 33, 56, 3, 2, 67, 101, 218, 4, 17 ); my @nums = sort { $b <=> $a } @array; print "The largest number is: $nums[0]\n";