- or download this
# File: Foo.pm
...
print "Hello from Foo!\n";
}
__END__
- or download this
# File: foo.pl
require Foo;
...
::hello(); # prints "Hello from main!\n";
Foo::hello(); # prints "Hello from Foo!\n";
__END__
- or download this
# File: Foo.pm
...
print "Hello from Foo_Helper!\n";
}
__END__
- or download this
# File: foo.pl
require Foo;
...
Foo::hello(); # prints "Hello from Foo!\n";
Foo_Helper::hello(); # prints "Hello from Foo_Helper!\n";
__END__
- or download this
require Foo_Helper;
- or download this
Can't locate Foo_Helper.pm in @INC (@INC contains: /usr/local/lib/perl
+/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /u
+sr/local/lib/site_perl .) at foo.pl line 2.
- or download this
# File: Foo.pm
...
# Look, Ma! No Foo!
__END__
- or download this
# File: foo.pl
require Foo;
...
Bar::hello(); # prints "Hello from Bar!\n";
Foo_Helper::hello(); # prints "Hello from Foo_Helper!\n";
__END__
- or download this
# File: Foo.pm
...
}
__END__
- or download this
# File: More_Foo.pm
...
}
__END__
- or download this
# File: foo.pl
...
Foo::hello_2(); # prints "Still in Foo!\n";
__END__
- or download this
require Foo;
require More_Foo;
- or download this
Undefined subroutine &Foo::hello_2 called at foo.pl line 10.
- or download this
# File: Foo.pm
...
sub hello {
print "Hello from Foo!\n";
}