Ronald Yacketta wrote: > Folks, > > I have the following block of code: > > open (CNTFILE, "${OUTPUTFILE}") or die "Can't open ${OUTPUTFILE} : > $!"; > @FILE=<CNTFILE>; > close(CNTFILE); > > Which reports this warning: > > Name "main::CNTFILE" used only once: possible typo at ./OrderTakingTree.pl > line 151. > > I am just opening the file, slurping it in and closing it. Whats the prob?
I hate to say I don't believe you, but "I don't believe you". :) CNTFILE is clearly used three times here and I'm sure this code on its own would compile without warnings. I would guess that you've got something like a 'package' statement in between those three lines, but whatever it is Perl isn't seeing the three statements within the same package. Maybe it isn't seeing all three at all. Do you have block comments like =comment =cut in your code that you've overlooked? I suggest you post your actual code with all the intervening lines. And tell us whihc is line 151! Cheers, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]