Think about Loose Coupling | |
PerlMonks |
Re: Sorting an array of strings when some of the strings have commas in them?by GrandFather (Saint) |
on Dec 11, 2015 at 22:27 UTC ( [id://1150076]=note: print w/replies, xml ) | Need Help?? |
If I turn your code into something to exercise your sort the first thing I find is that fc() is missing. Removing that the sort performs as expected:
Prints:
You will notice that I replaced tabs with ~ to make the column separators easier to see. So maybe you'd like to update my sample code to show your actual problem? Update: ah, I see fc is "new" as of about Perl 5.16 and I hadn't "turned it on" even though using Perl 5.20 :(. Restoring fc to the sort doesn't alter the result.
Premature optimization is the root of all job security
In Section
Seekers of Perl Wisdom
|
|