Perl-Sensitive Sunglasses | |
PerlMonks |
•Re: Dual personality: Module and scriptby merlyn (Sage) |
on Aug 03, 2004 at 15:11 UTC ( [id://379684]=note: print w/replies, xml ) | Need Help?? |
If I read you correctly (and it is still early in the morning here), you want caller:
So, unless (defined caller) { ... } will execute that code if it's being brought in as the main level of the program, rather than a module. -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|