On Tue, May 28, 2002 at 01:20:48PM -0700, Eric Wang wrote: > @result = sort @array > > it sorts the numbers by digits, but not the whole number > for example 6666 is bigger than 443322341 because it's first digit is a 6
Your question was answered by a another poster. I'll reiterate: see perldoc -f sort The sort routine sorts alphabetically (well, ASCIIbetically) by default, use a different comparison operator: @result = sort { $a <=> $b } @array; Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com -- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]