Another issue that the above posts touch on is your use of package variables. When you refer to $MAIN::Log, that is being treated as the variable called $Log in the package MAIN. This has nothing to do with your declaration MAIN:, which is merely creating a line label that you could use in a next or last statement. If you really want a package, you should declare it with package MAIN;. But I think a better idea, would be to put your decalarations like this:
my $Log; my $LogMsg; my $StdErr;
at the very top of your program outside any blocks. Then remove all the MAIN:: references everywhere you have them now.
In reply to Re: Newbie Q re: Undefined Value and "only used once" warnings
by Errto
in thread Newbie Q re: Undefined Value and "only used once" warnings
by mikeatrcn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |