Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: bug in R.E. ? Message-ID: <1991May6.222221.10498@jpl-devvax.jpl.nasa.gov> Date: 6 May 91 22:22:21 GMT References: <1991May3.175219@sic.epfl.ch> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 26 In article <1991May3.175219@sic.epfl.ch> brossard@sasun1.epfl.ch writes: : So, shoudn't [\S]+ be equivalent to \S+ or [\S] to \S? You won't find any documentation that says it works. I only implemented it for the lower case versions--it seemed too easy to say [^\s]+. I suppose I could be argued out of this... : Another bug I have tickled causes my perl script to core : dump after printing a lot (>>100) lines with an error (?) message: : : Word too long. : Word too long. : Word too long. This is a message from your shell, not from perl. Probably because you said: : @dirs = <$DIR[a-z]*>; This makes use of the shell to do globbing, which has its advantages and its disadvantages. You've just discovered the primary disadvantage--shells have arbitrary limits. When writing a program like this, it's better to use opendir() and readdir(). It won't run into the limits of the shell, and it runs faster too. Larry