Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: eval point in hash ref

by hdb (Prior)
on May 22, 2013 at 07:20 UTC ( #1034696=note: print w/ replies, xml ) Need Help??


in reply to eval point in hash ref

Is this what you want?

use strict; use warnings; use Data::Dumper; my $nethist; $nethist->{seek} = 42; my $in = '{seek}'; my $val = eval '$nethist->'.$in; print Dumper($val);


Comment on Re: eval point in hash ref
Download Code
Replies are listed 'Best First'.
Re^2: eval point in hash ref
by ag4ve (Monk) on May 22, 2013 at 07:25 UTC
    Thanks, that's what I was looking for.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1034696]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-28 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (259 votes), past polls