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

yeah, that's why i don't code in perl


Claiming that Perl is a bad language because you can obfuscate it just means that you've never looked for "obfuscated <better language>".


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.


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.


And, it's one of many reasons I do.




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

Search: