Keep It Simple, Stupid | |
PerlMonks |
Re: Dual personality: Module and scriptby fergal (Chaplain) |
on Aug 03, 2004 at 15:23 UTC ( [id://379696]=note: print w/replies, xml ) | Need Help?? |
Here's a solution that works with require and use. Assuming it's saved in mod.pm
output is fergal@linux:~> perl mod.pm I'm a script fergal@linux:~ perl -e 'require mod' I'm a module
In Section
Seekers of Perl Wisdom
|
|