I am currently using something like this:
my %tmpHash = routineReturningHash();
my $value = $tmpHash{'someKey'};
The only thing I need is $value
, I do not need %tmpHash
. Therefore, I am interested to know if there is a way to avoid the announcement %tmpHash
.
I tried
my $value = ${routineReturningHash()}{'someKey'};
but it does not work and displays a strange error: " Can't use string ("1/256") as a HASH ref while "strict refs" in use
".
Any ideas on how to do this?
Georg source
share