Guest_imported
New member
- Jan 1, 1970
- 0
Hi there, I have a quick question for ya!!!
I have only just started messing around with Perl and don't really know what im doing yet but I have created a couple of scripts that take data from a form and place it in a logfile.
The problem is I need to sort the output from this logfile by a "percent" colum (the last one in the below example) (ie 100% down to 0%)
Here's and example of what the log file looks like.
John Smith|john@smith.org|78.777
Joan Smith|joan@smith.org|65.987
phil Smith|phil@smith.org|68.776
tim Smith|tim@smith.org|100
dave Smith|dave@smith.org|98.13
carl Smith|carl@smith.org|13.8876
so on and so forth........
Is there anyway of reading the logfile and ordering the output so it has the highest percent first?
e.g.
name: email: percentage:
tim Smith tim@smith.org 100
dave Smith dave@smith.org 98.13
John Smith john@smith.org 78.777
phil Smith phil@smith.org 68.776
Joan Smith joan@smith.org 65.987
carl Smith carl@smith.org 13.8876
Any help you could give would be great!!!!
Many Thanks in advance....
mail me on wardy2001_booya@yahoo.co.uk
I have only just started messing around with Perl and don't really know what im doing yet but I have created a couple of scripts that take data from a form and place it in a logfile.
The problem is I need to sort the output from this logfile by a "percent" colum (the last one in the below example) (ie 100% down to 0%)
Here's and example of what the log file looks like.
John Smith|john@smith.org|78.777
Joan Smith|joan@smith.org|65.987
phil Smith|phil@smith.org|68.776
tim Smith|tim@smith.org|100
dave Smith|dave@smith.org|98.13
carl Smith|carl@smith.org|13.8876
so on and so forth........
Is there anyway of reading the logfile and ordering the output so it has the highest percent first?
e.g.
name: email: percentage:
tim Smith tim@smith.org 100
dave Smith dave@smith.org 98.13
John Smith john@smith.org 78.777
phil Smith phil@smith.org 68.776
Joan Smith joan@smith.org 65.987
carl Smith carl@smith.org 13.8876
Any help you could give would be great!!!!
Many Thanks in advance....
mail me on wardy2001_booya@yahoo.co.uk