package MyPackage; # if invoked from the command line, call run() with # command-line input __PACKAGE__->run( @ARGV ) unless caller();
I have tried creating a .pl file and the keyword "package" throws errors. I have tried creating a .pm file, then putting main code (even "print 'Hello World', before the "1;", and this throws different errors.You'll have to be more specific; I do those things all the time without a hitch.
In reply to Re: Can I do single-file, Object oriented perl?
by trammell
in thread Can I do single-file, Object oriented perl?
by FatDog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |