in reply to magic eval variables
Personally, I wouldn't really recommend doing things like this unless you're really sure what you're doing. You're basically using symbolic references, since you can also do the same thing w/o the eval. For example:
This prints "bar".$foo = "bar"; $_ = "foo"; print $$_;
A better option might be to create a hash of objects, if at all possible. But that's just my opinion.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: magic eval variables
by Anonymous Monk on May 04, 2000 at 03:02 UTC |