You have a series of problems:
- the text outside functions in a module is executed at BEGIN time and only once if you use the module; this is because
use Module;
is a special way of saying
BEGIN { require Module; }
and require only loads each module once (it checks on @INC to see if the modules wasn't already loaded.
- as you are under some CGI environment, some possibilities exist: the module was loaded before CGI (so STDOUT wasn't redirected to the browser yet), or you missed the first time you loaded the page and the module was already loaded by perl (and then you won't see it again, even if you reload the page, because the module is already loaded).
- You are yet to explain why you want to do this. Maybe if you explain, we can come up with alternatives for you.
| [reply] [d/l] [select] |