in reply to "Is it a Perl program or a Perl script?" What would p5p think ? What do you think ? :)

package Foo; # some code here package main; return 1 if caller(); print "as a program\n";

Calling it as a program:

$ perl Foo.pm Called as a program!

... and as a module:

$ perl -MFoo -e 1 $

Calling a non-existent module as a program:

$ perl Bar.pm Can't open perl script "Bar.pm": No such file or directory

The word "script" does seem inaccurate.

  • Comment on Re: "Is it a Perl program or a Perl script?" What would p5p think ? What do you think ? :)
  • Select or Download Code