I'm not sure I understand your whole question, but
the easiest way to find the largest integers is
to sort your array in reverse numeric order:

my @array (5, 6, 7, 89, 1, 0, 456, 298023, 56);
my @sorted = sort {$b <=> $a } @array;

Now @sorted should contain:

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

What do you want to do with this?

Aloha => Beau.

-----Original Message-----
From: Mystik Gotan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 10, 2002 3:10 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: How to get the biggest integers from an array?


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: [EMAIL PROTECTED]




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


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to