Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!decwrl!mcnc!uvaarpa!mmdf From: worley@compass.com (Dale Worley) Newsgroups: comp.lang.perl Subject: Bug(?) report Message-ID: <1991Mar28.172718.6622@uvaarpa.Virginia.EDU> Date: 28 Mar 91 17:27:18 GMT Sender: mmdf@uvaarpa.Virginia.EDU (Uvaarpa Mail System) Reply-To: worley@compass.com Organization: The Internet Lines: 26 X-Name: Raymond Chen In article <1991Mar27.205437.28251@uvaarpa.Virginia.EDU> you write: > if (index("/.", *tmpfilename)) > >The effect of the above 'if' is that if the argument to 'do' >or 'require' *contains* the substring '/.', then the searching in @INC >is suppressed. Methinks you are mistaken. The test in question says `check if the first character of tmpfilename is a dot or a slash'. Observe the `*' in front of tmpfilename, and reread the man page for index(3). Oops. Much embarrassed. I should have checked it more carefully. However, its behavior is still peculiar -- the check should be for "starts with slash or with dot-slash". If a name starts with dot-dot, the user may well want to have it searched for. Dale Dale Worley Compass, Inc. worley@compass.com -- Never share a foxhole with anyone braver than yourself. -- Murphy's Laws of Combat