Perl humor

So, I’m hackin’ some PERL. As frequently happens, the fact that it’s PERL leads me down this crazy obscure path of references to arrays and arrays of references. I would up doing something the hardest and most bass-ackwards way possible:

print ${@{split(/ /, $string)}}->[$i] . "\n";

This produced an error message I’ve never seen before, but which made me giggle:

Bizarre copy of ARRAY in leave at ./test line 5.

The scary part of this is that they foresaw my hack, and coded a specific error message for it.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.