From waldo at cos.com Fri Mar 16 08:52:28 2001 From: waldo at cos.com (David Waldo) Date: Wed Aug 4 23:57:28 2004 Subject: perl + firearms + highschool student = trouble Message-ID: >From perl.com, beware of mistaken scalar context assignments ... The big buzz in Perl today is a Slashdot post to the effect that a couple of high school sophmores attracted the attention of their school administrators, and eventually even the police, all thanks to a little confusion over the difference between scalar and list contexts in perl. # Scalar context assignment: Store the entire output of the well-known # UNIX fortune(1) program. my $f = `fortune`; ... is not the same as ... # List context assignment, with one element on the left side: Store # *just the first line* of the output of fortune(1). my ($f) = `fortune`; Apparently, the lad in question used the latter code to generate random quotes on his webpage, rather than the former scala context code, which is probably what he wanted. When school administrators viewed the site, they got a page containing, among other things, just the first line of a William Gibson quote mentioning smuggling firearms, totally out of context and without attribution. The rest of the story isn't hard to imagine, but you can read all about it at: http://slashdot.org/article.pl?sid=01/03/13/208259 The article concludes by quoting from the Camel 3: "You will be miserable until you learn the difference between scalar and list context." Yeah, no kidding. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 2799 bytes Desc: not available Url : http://mail.pm.org/archives/baltimore-pm/attachments/20010316/f5cc2994/attachment.bin From waldo at cos.com Fri Mar 16 09:15:11 2001 From: waldo at cos.com (David Waldo) Date: Wed Aug 4 23:57:28 2004 Subject: O'Really Online Catalog Message-ID: Take a very close look at this web site: http://bofhcam.org/co-larters/index.html I especially like: http://bofhcam.org/co-larters/user-obliteration/index.html http://bofhcam.org/co-larters/distributing-clue/index.html http://bofhcam.org/co-larters/why-you-cant/index.html And the really good news: T-shirts too!!! http://www.copyleft.net/search.phtml?search=1&lookup[brand_id]=55 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 2024 bytes Desc: not available Url : http://mail.pm.org/archives/baltimore-pm/attachments/20010316/4b2de704/attachment.bin From bsimon at stsci.edu Fri Mar 16 12:13:17 2001 From: bsimon at stsci.edu (Bernie Simon) Date: Wed Aug 4 23:57:28 2004 Subject: O'Really Online Catalog In-Reply-To: References: Message-ID: <15026.22284.774694.115488@valis.stsci.edu> David Waldo writes: > Take a very close look at this web site: > > http://bofhcam.org/co-larters/index.html They've also got a funny 404 error page. Try leaving off the last 'l' on the URL. -- Bernie Simon