|We don't bite newbies here... much|
Re: Accessing main::Constantby bart (Canon)
|on Dec 17, 2009 at 09:02 UTC||Need Help??|
The reason for your error is because the snippet
is compiled before the the snippet
(BTW braces for constant?? Weird.)
so perl has to apply some heuristics while parsing the former code. An all uppercase bareword ("FO1") as a first parameter to print, makes perl assume it's a filehandle.
So what you must do is one of the following:
BTW It's considered best practice to start package (and module) names with an uppercase letter.
Seeing the trouble with the former attempt at a solution, the latter definitely looks like the best option.