Hi,

I have a module like the one below:

package Teddy::Languages::ro::Help;

our $content = "here is the content...";


I want to get the value of $content from a program when a part of the name
of this module is given at runtime.
The program is:

my $lang = 'ro';
my $mod = 'Help';

I have tried:

my $module = "Teddy::Languages::${lang}::${mod}";
eval "require $module";

Then I want to print that value, but I don't know how.

I have tried:

print Teddy::Languages::$lang::$mod::content;
print $module::content;

I am missing something and I cannot make it work. Please help me.

Thank you.


Teddy



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to