Sorting numbers in an array

Anton Markov anton-F0u+EriZ6ihBDgjK7y7TUQ at public.gmane.org
Wed Aug 18 03:02:37 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

See the sort() function:
<http://www.perldoc.com/perl5.6/pod/func/sort.html>

Basic usage:
@new_array = sort @array

Madison Kelly wrote:
| Hi all,
|
|   I have an array of interger values in perl (i386 Linux 2.6 - FC2). Is
| there an easy way that anyone knows to pull those values out from
| smallest value to largest (or vice versa)?
|
|   Thanks!
|
| Madison
| --
| The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
| TLUG requests: Linux topics, No HTML, wrap text below 80 columns
| How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml

- --
Anton Markov <("anton" + "@" + "truxtar" + "." + "com")>

GnuPG Key fingerprint =
5546 A6E2 1FFB 9BB8 15C3  CE34 46B7 8D93 3AD1 44B4

*** LINUX - MAY THE SOURCE BE WITH YOU! ***
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBIsbMRreNkzrRRLQRAjblAJ4zJJ6ASskiqTc56NI+Mz7t7aWBYACeLckm
TV51rmB4RuUkmOxvn0vR8eY=
=d6qN
-----END PGP SIGNATURE-----
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list