Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uwm.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: Is this a bug? Message-ID: <1990Aug9.155120.2703@uvaarpa.Virginia.EDU> Date: 9 Aug 90 15:51:20 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 20 I tried to write a program with the following regexp: /(^\s*$)|(^---)/ That is, match any line containing only whitespace, or beginning with '---'. (Are ^ and $ allowed other than at the beginning or end of the regexp?) Perl gives the strange error message: /(^\s*|(^---)/: unmatched () in regexp at ss line 3. Where did the missing ')' go? Actually, it was probably assumed to be part of a '$)' variable. (Can one use '$/' as a variable is a regexp?) What is going on here? What *should* be going on here? Dale Worley Compass, Inc. worley@compass.com -- LA, truth to tell, is not much different from a pretty girl with the clap.