Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
open(INF,"file.txt") || print "Cannot open file\n"; @data= <INF>; close(INF); @sortdata = sort { $a <=> $b } (@data); foreach $i (@sortdata) { # Print stuff }
Edited by Chady -- added code tags.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sorting data problem
by sachmet (Scribe) on Dec 30, 2004 at 05:25 UTC | |
|
Re: Sorting data problem
by davido (Cardinal) on Dec 30, 2004 at 05:27 UTC | |
|
Re: Sorting data problem
by Errto (Vicar) on Dec 30, 2004 at 05:29 UTC | |
|
Re: Sorting data problem
by gopalr (Priest) on Dec 30, 2004 at 05:50 UTC | |
|
Re: Sorting data problem
by r34d0nl1 (Pilgrim) on Dec 30, 2004 at 10:31 UTC | |
|
Re: Sorting data problem
by Anonymous Monk on Jan 03, 2005 at 02:22 UTC |