In this case test() gets called (via import) when the module is "use"d.package ScrewyModule; sub import{ test(); } sub test{ print "in ScrewyModule.pm\n"; } 1;
"You're only given one little spark of madness. You mustn't lose it." - Robin Williams
In reply to Re: sub running on use statement
by NetWallah
in thread sub running on use statement
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |