3 ms·
Your everyday Perl is much nicer: perl -e 'my $vals = ".003, .002, .005"; my @sorted = sort { $a > $b } map { $_ =~ s/ +//g; $_ } split(",",$vals); print "$_ "
by Moto7451 13y ago
Your everyday Perl is much nicer:
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.