What's the error message that you get? That problematic line works for me.
where Foo.pm is#!/usr/bin/perl use lib "/Users/brian/Desktop"; require "Foo.pm"; $module = 'Foo'; print $module->description, "\n";
package Foo; sub description { "Hello there!" } 1;
In reply to Re: Accessing variables in a runtime-loaded module
by brian_d_foy
in thread Accessing variables in a runtime-loaded module
by srd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |