Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: getting closer Message-ID: <8532@jpl-devvax.JPL.NASA.GOV> Date: 28 Jun 90 23:53:40 GMT References: <8501@jpl-devvax.JPL.NASA.GOV> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 20 In article vixie@decwrl.dec.com (Paul A Vixie) writes: : Yes, but since you went out of your way to make sure that most \W meta- : characters meant their literal selves when backslashed (I refer you to: : : This makes it sim- : ple to quote a string that you want to use for a pattern but : that you are afraid might contain metacharacters. Simply : quote all the non-alphanumeric characters: : : $pattern =~ s/(\W)/\\$1/g; : : ), it seems intuitively neccessary that for ALL \W metacharacters to : mean their literal selves when backslashed. I know that's what *I* : expected :-). Ok, you can say /[a\-z]/ now and get a, - and z. Well, I can say it, anyway. It'll be in the next patch. Larry