hotel has asked for the wisdom of the Perl Monks concerning the following question:
As far as I could figure out, sort() function doesn't sort the way I want it to, since it sorts alphabetically or numerically. It starts with9.10.force.0.5.1LGY.pdb 29.30.force.0.5.1LGY.pdb 30.31.force.0.5.1LGY.pdb 31.32.force.0.5.1LGY.pdb .... .... 100.101.force.0.5.1LGY.pdb 101.102.force.0.5.1LGY.pdb .... .... 200.201.force.0.5.1LGY.pdb 201.200.force.0.5.1LGY.pdb
and continues in this manner, and then places the file 9.10.force.0.5.1LGY.pdb to its place alphabetical wrt its alphabetical order. However, I want to sort these files with respect to their first digit. If any of you can advice a way to do it, I'd appriciate. Thanks a lot.100.101.force.0.5.1LGY.pdb 101.102.force.0.5.1LGY.pdb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting an array of file names
by shmem (Chancellor) on Dec 19, 2009 at 16:43 UTC | |
by hotel (Beadle) on Dec 19, 2009 at 17:58 UTC | |
by almut (Canon) on Dec 19, 2009 at 19:50 UTC | |
|
Re: sorting an array of file names
by Xilman (Hermit) on Dec 19, 2009 at 16:35 UTC | |
|
Re: sorting an array of file names
by bobf (Monsignor) on Dec 19, 2009 at 16:41 UTC | |
|
Re: sorting an array of file names
by almut (Canon) on Dec 19, 2009 at 16:34 UTC | |
|
Re: sorting an array of file names
by Anonymous Monk on Dec 19, 2009 at 20:15 UTC |