Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.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: $& after a case-insensitive search Message-ID: <11599@jpl-devvax.JPL.NASA.GOV> Date: 27 Feb 91 01:41:35 GMT References: <32947@sequoia.execu.com> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 27 In article <32947@sequoia.execu.com> painter@sequoia.execu.com (Tom Painter) writes: : : I'm having a little problem with the $& notation. I haven't seen any : mention of this in the book. It seems that the string that is matched : is actually the string that appears in the script rather than the : actual match from the input. This results in problems when there is a : case difference. : ... : : Am I missing something? Is this fixed after PL41? Is there : a work-around? No, it's a real bug. It will be fixed in 4.0. The workaround is to force the optimizer to hand the pattern off to the real pattern matcher: /FIL[E]/i or /\bFILE/i or 1 && /FILE/i; Larry