# file test/script.pl use Foo; system('cd ..; rm -rf test/'); print Foo::bar(); # file test/Foo.pm package Foo; sub bar { return "I'm happy\n"; } 1