in reply to Can I do single-file, Object oriented perl?
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.
|
|---|