http://www.perlmonks.org?node_id=442238


in reply to Alpha number sort

Perhaps Sort::Naturally can be of help.

Replies are listed 'Best First'.
Re^2: Alpha number sort
by tlm (Prior) on Mar 25, 2005 at 03:13 UTC

    Indeed:

    use strict; use Sort::Naturally; print for nsort( <DATA> ); __DATA__ a1.5 a1.55 a1.55b a1.5b a1.6 a1.6b linux-2.10.50.tar linux-2.10.6.tar linux-2.4.28.tar linux-2.4.29.tar linux-2.4.29a.tar linux-2.4.3.tar

    % perl 442238.pl a1.5 a1.5b a1.6 a1.6b a1.55 a1.55b linux-2.4.3.tar linux-2.4.28.tar linux-2.4.29.tar linux-2.4.29a.tar linux-2.10.6.tar linux-2.10.50.tar

    the lowliest monk