Michael Gargiullo wrote:
> I have a bit of code thats throwing errors. "Use of uninitialized value..."
>
>
> #!/usr/bin/perl -w
> my $setup=0;
> while ($ARGV[0] =~ /^\-/) {
> if ($ARGV[0] eq '-s') {
> $setup = 1;
> shift;
The shift here removes $ARGV[0] from the arg list, the next time while
is processed it is undef
causing the error. Seeing what you are doing check out Getopt::Std
(perldoc Getopt::Std).
>
> }
> }
>
> the code is basicly this at this point. I run it like so:
>
> #>./graboptions.pl -s
>
> Any Ideas?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]