The stupid question is the question not asked | |
PerlMonks |
Re: Sort on Number Embedded in Stringby RazorbladeBidet (Friar) |
on Mar 22, 2005 at 19:16 UTC ( [id://441583]=note: print w/replies, xml ) | Need Help?? |
Wow, lots of replies, glad I didn't post mine :D
BUT - you have to make sure you're sorting on the right thing... you won't be if you just cmp on xxMarxxxx. You should grab the year, month and day and convert the month to the numeric equivalent and then format it as YYYYMMDD. Then <=> it Update: Took me a little bit to get the hang of it, but this works:
-------------- It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs
In Section
Seekers of Perl Wisdom
|
|