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

A tale about Perl array vs scalar context and `fortune` has gone missing from the internet (edit: found it, see below). I'll do my best to recount it.

The story goes a kid in high school setup a web page that displayed fortunes from, well, fortune. He did this via a Perl CGI program. One day, fortune spit out the following quote just as a teacher was viewing the page:

I put the shotgun in an Adidas bag and padded it out with four pairs of tennis socks, not my style at all, but that was what I was aiming for: If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy. So I decided to get as crude as possible. These days, thought, you have to be pretty technical before you can even aspire to crudeness. I'd had to turn both those twelve-gauge shells from brass stock, on the lathe, and then load then myself; I'd had to dig up an old microfiche with instructions for hand-loading cartridges; I'd had to build a lever-action press to seat the primers -all very tricky. But I knew they'd work. -- Johnny Mnemonic

Unfortunately due to the kid mistaking scalar vs array context, only the first line of the paragraph was displayed: I put the shotgun in an Adidas bag and padded it out with four pairs of tennis socks.

Missing the attribution, the teacher did not recognize this as a book quote. This resulted in police being called on the kid. Fortunately it was resolved w/o incident.

Now, I may be misremembering the story which isn't mine. I vaguely recall that maybe it was something Tom Christiansen used to tell? Maybe it appeared on Slashdot? Maybe it's apocryphal? I can't find the original.

Edit: Randal Schwartz recounted the story here:

https://web.archive.org/web/20070126150617/http://www.stoneh...

It was originally on Slashdot and I mostly got the details right. :-)



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

Search: