Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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 scrutinizing the Monastery: (12)
As of 2015-08-28 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (336 votes), past polls