Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Trolling homework questions - sorting. Parent comment
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.
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.