> uninitialized value in 
> pattern match (m//) at ./getopt.pl line 14.'
 
Use the standard Getopt::Std module to process options. Don't do it
yourself.

> Line 14 is the while line..
> 
> I've tried all sorts of stuff with defined but keep getting syntax 
> errors. I've tried perldoc warnings and perldoc perllexwarn .. In any 
> case, unless I'm really missing something, I can't see what could be 
> problematic with the while statement below, of course this shows my 
> ignorance but as I've decided to use warnings and strict, I 
> want to do 
> it right..
> 
> How would a pedant code the following to avoid this warning.. Your 
> answers will help me in the future.
> 
> #if ($#ARGV >= 0) { # What I've tried
>          while ($_ = $ARGV[0], /^-/) {
>                  shift;
>                  last if /^--$/;
>                  if (/^-d(.*)/) { $debug++ }
>                  elsif (/^-v(.*)/) { $verbose++ }
>                  else { print "$_ unknown option\n";
>                          Usage;
>                  }
>          }
> #}

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to