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).
Thanks
-Craig
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.
In reply to Re^4: Bug in Sort::Fields?
by cmv
in thread Split(), Initial Spaces, & a limit?
by cmv
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |