bug in perl concerning arrays?

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Thu Jul 6 09:23:00 AEST 1989


In article <2070 at taux01.UUCP> cjosta at 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 at jpl-devvax.jpl.nasa.gov



More information about the Comp.sources.bugs mailing list