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);

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?
[perldigious]: I didn't want to tie up memory unecessarily basically, I wanted to "delete" it specifically to free it up, and wasn't sure I was even accomplishing that.
[stevieb]: perldigious You should start by writing some unit tests. That'll ensure current functionality doesn't break with changes.
[choroba]: unit tests++
[choroba]: The only problem you can't solve by adding more tests is the problem of having too many tests.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2017-07-21 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (335 votes). Check out past polls.