# calling program: foo.pl #!/usr/bin/perl -w use strict; use MyPack; print "$foo\n"; bar(); __END__ # module file: MyPack.pm package MyPack; require Exporter; @ISA = qw/Exporter/; @EXPORT = qw/$foo bar/; use strict; $MyPack::foo = 42; sub bar { print "This is MyPack::bar, who's calling please?\n"; } 1; __END__ # example run: [jandrew:~]$ perl foo.pl 42 This is MyPack::bar, who's calling please?