The problem is with the "use" statement use Fatal qw(open close); For some reason if I do
use Fatal qw(open close); I get the error, but if I do a use Fatal; I don't... -Ron -----Original Message----- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Friday, June 13, 2003 10:45 To: 'Yacketta, Ronald'; [EMAIL PROTECTED] Subject: RE: Perl -w odd error Yacketta, Ronald wrote: > Rob, > > Line 151 _IS_ @FILE=<CNTFILE>; and here is the entire block of code > > sub OTTExecute() > { > system($ExecCmd); > $success = $? >> 8; > printNotice ("$success\n"); > > if ( ! $success ) > { > my ($record_count, @FILE); > open (CNTFILE, "${OUTPUTFILE}") or die "Can't open > ${OUTPUTFILE} : $!"; @FILE=<CNTFILE>; <=== THIS IS > LINE 151!! close(CNTFILE); > $record_count=$#FILE; > > $record_count = 0 if( $FILE[$record_count] =~ > /$g_no_recs/); > > printNotice ($FILE[$record_count]); > printNotice ("$record_count\n"); > > $Subject_Line = "OTT : succeeded on `hostname` -- > $record_count records created"; > } > else > { > $Subject_Line = "OTT : failed on `hostname`"; > } } > > _EXACT_ error: > Name "main::CNTFILE" used only once: possible typo at > ./OrderTakingTree.pl line 151. Ronald, when I compile that snippet I don't get that warning. (I have to comment out the annotation you made). Post a block of code and the exact warning you get from compiling *that* block of code with perl -cw (not some other, larger, block). Don't add any annotations; we want to paste that block into a file and duplicate the warning you're seeing. -- 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]