|Don't ask to ask, just ask|
Re^4: Bug in Sort::Fields?by cmv (Chaplain)
|on Jul 20, 2010 at 19:14 UTC||Need Help??|
Since this is what Sort::Fields is doing, are you agreeing with me that this is a bug in that module?
As I implied earlier, the module should sort the exact same data, the same way, no matter where that data shows up (field 1, field 2, or field N).
update: Ah, sorry, you were still editing, and added more to the reply while I was responding.
I think my point is that Sort::Fields will "do the right thing" if the data containing initial spaces is in any place other than field 1. If the data is in field 1, then it does something different.
I believe this is because the author specifically uses /\s+/ as the field delimiter in his code. This works fine for every field except field 1 (as shown by the discussion at the beginning of this post). I would like to see this module do the same thing on the same data, no matter what field it show up in.
I believe this should be easily fixable, by replacing the /\s+/ with /' '/, as you showed me in an earlier post. I just can't figure out how to do that in his code. I also don't know what side effects that would have.