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:
foreach(@in::keywords) { $in::$_ =~s/asdf/fdsa/g; }
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to reference variables in another package via keyword names
by davido (Cardinal) on Jun 27, 2004 at 03:17 UTC | |
|
Re: How to reference variables in another package via keyword names
by gmpassos (Priest) on Jun 26, 2004 at 21:51 UTC | |
by etcshadow (Priest) on Jun 26, 2004 at 22:05 UTC | |
by theAcolyte (Pilgrim) on Jun 26, 2004 at 21:56 UTC | |
|
Re: How to reference variables in another package via keyword names
by keszler (Priest) on Jun 26, 2004 at 21:40 UTC | |
|
Re: How to reference variables in another package via keyword names
by BUU (Prior) on Jun 27, 2004 at 02:40 UTC |