perl -e 'my $vals = ".003, .002, .005"; my @sorted = sort { $a > $b } map { $_ =~ s/ +//g; $_ } split(",",$vals); print "$_ " foreach @sorted;'
You can alias the topic variable ($_) if you're not a fan.
perl -e 'my $vals = ".003, .002, .005"; my @sorted = sort { $a > $b } map { $_ =~ s/ +//g; $_ } split(",",$vals); print "$_ " foreach @sorted;'
You can alias the topic variable ($_) if you're not a fan.