Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!news.cs.indiana.edu!msi.umn.edu!sctc.com!scott From: scott@sctc.com (Scott Hammond) Newsgroups: comp.lang.perl Subject: pattern match strangeness Message-ID: <1991Apr11.011752.9372@sctc.com> Date: 11 Apr 91 01:17:52 GMT Distribution: na Organization: SCTC Lines: 34 When $s is set to "", the program below says: match, s= no match Both matches work for a non-null $s. Am I doing this wrong? #!/usr/local/bin/perl $s = ""; $pat = "/est/"; if ($s =~ eval $pat) { print "match, s= $s\n"; } else { print "no match\n"; } if ($s =~ /est/) { print "match, s= $s\n"; } else { print "no match\n"; } $Header: perly.c,v 3.0.1.10 91/01/11 18:22:48 lwall Locked $ Patch level: 44