tracer has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys,I am new to perl and am having some trouble with the following:
I have a file that has data which looks like:
#12346
orange
#12345
apple
banana
#12344
pear
I need to sort this data according to the numbers in either the same file or another file so that the output looks like the following:
#12344
pear
#12345
apple
banana
#12346
orange
How do I go about this? thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ordering data in a file.
by toolic (Bishop) on Jun 13, 2013 at 01:16 UTC | |
by Anonymous Monk on Jun 13, 2013 at 19:39 UTC | |
|
Re: Ordering data in a file.
by hippo (Archbishop) on Jun 13, 2013 at 08:47 UTC | |
|
Re: Ordering data in a file.
by Anonymous Monk on Jun 13, 2013 at 01:39 UTC |