> From: Brand Hilton [mailto:bhilton@adc.com] > Sent: Thursday, August 12, 1999 13:46 > To: fwp@technofile.org > Subject: [FWP] A tiny bit of fun with a regex > > > Okay, so this doesn't exactly require a PhD to find, but I did find it > mildly amusing. If you want it to be at all challenging, you can't > run it with -w or use strict. > > $_ = 'The score was 2/0 in the second inning.'; > print "found it\n" if /\d+ > \/ > \d+ # find something of the pattern y/x > /x Without -w or use strict, I see a division of 1 by the value of the bareword 'x', which is undoubtedly 0, so a run-time exception. What do I win? -- Larry Rosler Hewlett-Packard Laboratories http://www.hpl.hp.com/personal/Larry_Rosler/ lr@hpl.hp.com ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe