develooper Front page | perl.beginners | Postings from December 2002

How to get the biggest integers from an array?

Thread Next
From:
Mystik Gotan
Date:
December 10, 2002 05:22
Subject:
How to get the biggest integers from an array?
Message ID:
F84QVe0ZvBGOQYOgVGv0002332a@hotmail.com
Hiya,

I'm in search for a solution. Let's say I have this array:

@array (5, 6, 7, 89, 1, 0, 456, 298023, 56);

Now, how can I get the biggest integers from this array and give them a 
string with their place. Let's say I have a foreach loop where I checked all 
the biggest integers (however, I don't know how) and I give them all a 
string like:

$website_76 = 1; # position 1
$website_87 = 2; # position 2

--------------
Bob Erinkveld (Webmaster Insane Hosts)
www.insane-hosts.net
MSN: gotan2k3@hotmail.com




_________________________________________________________________
Ontvang je Hotmail & Messenger berichten op je mobiele telefoon met Hotmail 
SMS http://www.msn.nl/jumppage/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About