Just another Perl shrine | |
PerlMonks |
Re^3: Sorting using the highest last column criteriaby Bethany (Scribe) |
on Jul 27, 2014 at 20:20 UTC ( [id://1095266]=note: print w/replies, xml ) | Need Help?? |
Okay, that's a start. I see some problems that you should be able to fix. When I'm not sure why a script isn't doing what I expect, a good exercise is to write a comment before each line telling what I think that line of code should do. If it's a complicated line I write a comment for each part of the line. (This is a variation on "rubber duck debugging".) Then I add debugging code to print out the results after each step. This way I can find where things stop behaving as I expect them to behave. You won't learn much if someone just tells you "do this instead" and provides a ready-to-use solution. If you work it out for yourself you will have learned not only how to fix this problem but also how to approach the next problem you have to solve. Past this advice, as AppleFritter pointed out, you'll need to understand what you want your results to look like -- and you'll have to tell this to the people you're asking for guidance. Post an example of the output you'd like your code to produce.
In Section
Seekers of Perl Wisdom
|
|