Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: