in reply to
Re: Bug in Sort::Fields?
in thread Split(), Initial Spaces, & a limit?
I'm sorry, but I don't believe I understand your point. It seems that all you did to fix the problem was to remove the initial spaces in the original data.
In my opinion Sort::Fields should sort the data the same way, regardless of where the data is (field 1 or field 2). If you try to numerically sort the output of an 'ls -s' command, you can see the problem clearly:
my @data = `ls -s`; chomp(@data);
my @sorted = fieldsort( ['1n'], @data);
This doesn't do what is intended, and is why I made the report to the author. I'm sure I could remove the initial spaces for Data::Dumper, then put them back after it's done, but that doesn't seem right to me.