At the moment, I use something like this:
my %tmpHash = routineReturningHash();
my $value = $tmpHash{'someKey'};
The only thing I need is $value, I do not need %tmpHash itself. So I am curious to know if there is a way to avoid declaring %tmpHash.
I tried
my $value = ${routineReturningHash()}{'someKey'};
but it doesn't work and outputs a strange error: "Can't use string ("1/256") as a HASH ref while "strict refs" in use".
Any ideas how it could be done?