|
|
| Perl: the Markov chain saw | |
| PerlMonks |
How to reference variables in another package via keyword namesby theAcolyte (Pilgrim) |
| on Jun 26, 2004 at 17:26 UTC ( [id://369877]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.theAcolyte has asked for the wisdom of the Perl Monks concerning the following question: Okay ... I'm positive that this is likely simple and my brain is just not working today ... I'm using CGI.pm ... and calling import_names('in') which creates a package namespace for incoming CGI vals so you don't have to worry about name space collisions. You get a list of keywords that came in via @in::keywords, and can access the variables via $in::keyword. so ... why does the following produce an error:
I can't imagine how else you'd access the vars created by @in::keywords ... and if this doesn't work, why provide @in::keywords at all? I'm perplexed ... anyone help me out? - Erik
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||