Hi,

Here is a short perl script:

   open (FILE, "<$START");
   $nbc=0;
   foreach(<FILE>){
        if (/^XXX/ig)   { $atmnb[$nbc]++;}
        if (/^YYY/ig)   { $atmnb1=$atmnb[0];}
        if (/^ZZZ/ig)   { $nbc++;}
   }
   if ($atmnb1 eq "")   { $atmnb1=$atmnb[0];}
   close(FILE);
   $nbc++;

When I try to execute it using the '-w' option, I get the following warning:
"Use of uninitialized value in string eq at RED-II.pl line 8"

I do not understand as for me ($atmnb1 eq "") is needed for uninitialized
values.

How can avoid such warnings ?

Thanks, Francois

-- 
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