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


in reply to Alphnumeric Matching

If you are having trouble with sort how about you show us the sort code that is failing, the data you are feeding it, and how you expect the sorted result to look? The following may be a suitable starting point:

use strict; use warnings; my @tapes_to_eject = qw{B1001R B0001R B4356R}; my $tapesStr = join ':', map {"\$$_"} sort @tapes_to_eject; print "$tapesStr\n";

Prints:

$B0001R:$B1001R:$B4356R
True laziness is hard work