#Somehow, we figure out the name of a module we need: $module_name = 'mymodule.pm'; #Then load it: eval 'require $module_name'; #And then try to make use of its vars and subs: $module_name->import(); #fails (of course)