Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Minor error in getopt.pl and getopts.pl Message-ID: <6867@jpl-devvax.JPL.NASA.GOV> Date: 22 Jan 90 21:47:09 GMT References: <6788@ogicse.ogc.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 14 In article <6788@ogicse.ogc.edu> schaefer@ogicse.UUCP (Barton E. Schaefer) writes: : I'm not sure what the correct general solution to this is. For getopt : and getopts, it would be easy enough to refer to $ARGV[$[] everywhere. : But perhaps a better guideline is that all library functions should : use something like : : local($[) = 0; # Enforce local subscripting conventions : : (Would that work the way I think, Larry? Or would it be necessary to : save, reset, and restore the global $[ ?) That works, and I've added it to get*.pl and a few others. Larry