(Updated to show that it will also work fine with something like "text69.something-14-14")
(Update 2: Sort::Naturally also handles the data used by BrowserUK below "correctly") :)
#!/usr/bin/perl -w use strict; use Sort::Naturally; print for nsort(<DATA>); __DATA__ text1 text69.something-14-14 text2 text37 text5 text3 text10 text11
Gives:
text1 text2 text3 text5 text10 text11 text37 text69.something-14-14
Cheers,
Darren :)
In reply to Re: sorting numbered words
by McDarren
in thread sorting numbered words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |