Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.lang.perl Subject: Re: Chapter 6 passwd program problem Message-ID: <1991Feb5.225607.1769@iwarp.intel.com> Date: 5 Feb 91 22:56:07 GMT References: <1991Feb5.210926.7914@NPIRS.Purdue.EDU> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 22 In-Reply-To: ramsey@NPIRS.Purdue.EDU (Ed Ramsey) In article <1991Feb5.210926.7914@NPIRS.Purdue.EDU>, ramsey@NPIRS (Ed Ramsey) writes: | fieldofdreams 441 ### ./passwd | syntax error in file ./passwd at line 250, next token "open" | /^(jan|feb|mar(ch)?|apr(il)?|may|june?/: unmatched () in regexp at ./passwd line 647. | | Any suggestions? Yeah. It's a syntax error, and therefore, a typo. It looks like it crept in when we folded a long line into two pieces. Change those two lines to read: ($mo =~ /^(jan|feb|mar(ch)?|apr(il)?|may|june?)$/i || $mo =~ /^(july?|aug|sept?|oct|nov|dec)$/i) ) { and be sure to send in the reader-comment card in the back. :-) print "Just another Perl book hacker," -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/