- or download this
# main.pl
use Bar;
use Foo;
Bar("Called from main");
&Foo();
- or download this
# Foo.pm
package Foo;
...
use strict;
sub Bar { print "$_[0]\n"; }
1;
- or download this
Called from main
Undefined subroutine &Foo::Bar called at Foo.pm line 7