On Fri, 22 Nov 2002, Stovall, Adrian M. wrote: > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Friday, November 22, 2002 4:38 PM > > To: Stovall, Adrian M.; [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: RE: regular expression question > > > > > > I tried that, it does not work for me! > > > > Lixin > > > > This code should print "yes", if it does, then the code works for you... > > $line = 'Job "\nest and \toolbox VOBs" began execution on 9/6/02 at > 2:00:11 AM.'; > print "$line\n"; > if ($line =~ m#\"\\nest and \\toolbox VOBs\"#) { print "yes"; } > else { print "no"; } >
Your code may work fine but as long as his code is archoring the regex to the result of the function call: chomp($read_lines[0]) it won't. Unless of course he changes the regex match string to: m#^[01]$#; Note that the result of doing chomp on a scalar will be one of two values, 0 or 1. **** [EMAIL PROTECTED] <Carl Jolley> **** All opinions are my own and not necessarily those of my employer **** _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs