News for hackers. Stuff that matters.
Re:Trolling homework questions - sorting by Moto7451 on Saturday December 28, 2013 @05:01AM (#6974583)
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.

There are no comments on this comment yet.