-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =pod Recently, Perl golf has become popular on Stack Overflow. This is dumb for more reasons than I care to enumerate, but what really makes me mad is that most people engaging in this dubiously-useful hobby do not know enough Perl to do it right! Here is an example of doing it wrong: lang:Perl map { ucfirst $_ } split /[.]/, $_; Do you see the C<$_>? If you knew Perl, you would know that functions usually operate on C<$_> if you omit it. You might not know which functions do and which functions don't, but you should see the C<$_> and wonder if you can omit it. Looking at the docs for C and C reveal that they both do in fact operate on C<$_> when another expression is not specified. Thus, we can golf this down to: map{ucfirst}split/[.]/ Much more readable, and much shorter. (Also, if your task was to sentence-case your input, you did it wrong. But hey, at least it's only 22 bytes!) Seriously though, if you are going to take up Perl golf as a hobby, learning the simplest of simple Perl tricks might be a good way to avoid looking like a reputation-point-whoring moron. As an aside, Stack Overflow's reputation system is slowly killing the site. In an effort to gain reputation points, people are answering questions that they admit to not knowing the answer to. It seems like every answer in the Perl section starts off with the phrase, "I don't know Perl, but...". If you don't know Perl, and this is a Perl question, how about shutting the fuck up and not making yourself look like an idiot? What a fucking concept... (This has also infected the Emacs section, which I mostly read for comedic value these days. It's fun to watch how quickly people can produce completely wrong and useless answers, or reimplement core functions in the most inefficient way possible. Need to move backwards one character? Pressing the C<< <- >> arrow or executing C is too magical, it's much better to get the current position in the buffer, move the point to the beginning of the buffer, and execute a keyboard macro to press the C<< -> >> arrow key that many times minus one. It's only 25 lines of code! So simple!) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkpZ+zUACgkQ2rw+dVvzZm1JMACeJRLxx4SDmFVjGUHlLcKM2Bi1 qFgAnjWYZyAqc4N5hmzFmN8fEf14yz1D =EJiH -----END PGP SIGNATURE-----