News for hackers. Stuff that matters.
Re:Trolling homework questions - sorting by ultimatedelman on Friday December 27, 2013 @08:46PM (#6973498)
yeah, that's why i don't code in perl
Re:Trolling homework questions - sorting by NegativeK on Friday December 27, 2013 @09:42PM (#6973628)
Claiming that Perl is a bad language because you can obfuscate it just means that you've never looked for "obfuscated <better language>".
Re:Trolling homework questions - sorting by lmm on Saturday December 28, 2013 @12:10PM (#6975408)
I've looked quite hard for obfuscated Python (and there are a couple of other answers to this question using it). It's always been much more readable than that perl.
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.

Re:Trolling homework questions - sorting by SwellJoe on Friday December 27, 2013 @10:25PM (#6973756)
And, it's one of many reasons I do.