getting the value of a var
- From: orasnita@xxxxxx (Octavian Rasnita)
- Date: Sat, 27 Aug 2005 19:41:40 +0300
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
.
- Follow-Ups:
- Re: getting the value of a var
- From: Matija Papec
- Re: getting the value of a var
- Prev by Date: Re: PLEASE HELP
- Next by Date: Re: Need an explanation
- Previous by thread: Date in perl
- Next by thread: Re: getting the value of a var
- Index(es):