Package Foo; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw($foo foobar); $foo = "bar"; sub foobar { $blah = "hi"; print "$foo $blah\n"; } 1; #### #!/usr/bin/perl use Foo qw(foobar); $bar = "hi"; foobar(); #### perl -w foo.pl