good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Ordering data in a file.by tracer (Initiate) |
on Jun 13, 2013 at 00:56 UTC ( [id://1038642]=perlquestion: print w/replies, xml ) | Need Help?? |
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.
Back to
Seekers of Perl Wisdom
|
|