![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: "Dynamically" Accessing a HoHby ysth (Canon) |
on Jun 02, 2005 at 15:39 UTC ( #462953=note: print w/replies, xml ) | Need Help?? |
To make merlyn happy:
Why not just keep using eval, but validate your $usr_str? If you do change to parsing out string keys and looping through them, which is really easy to do as others have demonstrated, be aware that some things will actually work differently, e.g. $usr_str = "{0x2a}{052}", which with eval is equivalent to {42}{42}.
In Section
Seekers of Perl Wisdom
|
|