Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.sources.bugs Subject: Re: bug in perl concerning arrays? Message-ID: <5262@jpl-devvax.JPL.NASA.GOV> Date: 5 Jul 89 23:23:00 GMT References: <2070@taux01.UUCP> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 16 In article <2070@taux01.UUCP> cjosta@tasu77.UUCP (Jonathan Sweedler) writes: : #!/usr/local/bin/perl : @directory = @ARGV; : --$#directory; : print $#directory; : : This should set the array 'directory' equal to all of the command line : arguments except the last one. But, the last line in the perl program : always prints out '-1' and the array is left null. : ... : Am I doing something wrong here? Or is this a bug in perl? It's a bug, and I just fixed it in 3.0. Larry Wall lwall@jpl-devvax.jpl.nasa.gov