[Pdx-pm] $#ARGV
Karl Stump
karlstump at yahoo.com
Tue Sep 19 11:14:48 PDT 2006
$# returns the subscript of the last element of the
array, or one less than the length. So, -1 is very
possible when no command line parameters are
specified.
--- Thomas Keller <kellert at ohsu.edu> wrote:
> Greetings,
> I'm running the debugger on a script that fails to
> launch (it's
> called from another program) that I just got from
> someone and it
> terminates line 24:
>
> 23: if ( $#ARGV < 0 ) {
> 24: die $usage;
> 25: }
>
> I'm assuming the debugger terminates because $#ARGV
> is less than
> zero, but I don't understand why.
> How can $#ARGV be less than 0? Have I forgotten
> something basic again?
> Thanks,
>
> Tom K
> kellert at ohsu.edu
> 4-2442
>
>
> > _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Pdx-pm-list
mailing list