C
clarence
This has to be about the simplest question ever. And I was quite
competent with perl before I stopped using it 7 years ago. I've
been banging my head against the camel book (and the wall) for two
hours now... I'm using Perl 5.8.6
I have a module file called mod.pm, containing:
sub P {
print "in P()\n";
}
return 1;
if I do
$ perl
use mod;
P();
I get
in P()
If I do
$ perl
require mod;
mod:
();
I get
Undefined subroutine &mod:
called at - line 2.
What the heck is wrong with that?
Thanks.
competent with perl before I stopped using it 7 years ago. I've
been banging my head against the camel book (and the wall) for two
hours now... I'm using Perl 5.8.6
I have a module file called mod.pm, containing:
sub P {
print "in P()\n";
}
return 1;
if I do
$ perl
use mod;
P();
I get
in P()
If I do
$ perl
require mod;
mod:
I get
Undefined subroutine &mod:
What the heck is wrong with that?
Thanks.