Perl in the comics

| 4 Comments

I think by now we've all seen the comic from xkcd.com that gives Perl its proper respect and place in the history of the universe.

Some comics are a little less respectful, but I'll cut the guy some slack because he wrote a text adventure version of Pac-Man.

4 Comments

I'd just like to point out, that it is completely valid Perl (providing you don't use strict) :o)

  $ echo "@+-$^P&%"       > comic.pl
  $ echo "$#*@F%$$#!$#!" >> comic.pl
  $ perl -c comic.pl
  comic.pl syntax OK

Cool! =]

(although it just doesn't do anything useful)

There are a lot of other comics in which Perl shows up. Perl Foundation's Perl 5 wiki tried to gather all of them. They should add this one too!

That's not right, breno. The shell will try to expand $# as a shell variable, for example. Plus, ! is a special character in bash, and I can't execute the second line. If you do it in sh, though, look at what comic.pl shows you:


$ cat comic.pl
@+-$^P&%
0*@F%404#!0!

Not what you entered. You need single-quotes in your shell commands, just like if it was in Perl.

$ echo '@+-$^P&%' > comic.pl
$ echo '$#*@F%$$#!$#!' >> comic.pl
$ cat comic.pl
@+-$^P&%
$#*@F%$$#!$#!

Now it at least matches. So let's see a deparsed version of that mess:

$ perl -MO=Deparse comic.pl
@+ - $^P & %${#} * @F % $$;
comic.pl syntax OK

A bit more readable, if not more useful.

We have a list of Perl-related cartoons on perl.net.au. I see we missed the 0x2121 one. I'll add it now, thanks!

That put aside, Perl has also been mentioned sometimes on Working Daze and Foxtrot, but these are commercial comics that eventually become inaccessible to non-paying surfers.

Leave a comment

Job hunting for programmers


Land the Tech Job You Love, Andy Lester's guide to job hunting for programmers and other technical professionals, is available in PDF, ePub and .mobi formats, all DRM-free, as well as good old-fashioned paper.