W
wana
I know I must be doing something stupid here. I want to return a
value out of a hash using a reference. To be specific:
$session{_session_id} is the hash value I need to get at. Just to
make things interesting, I named my scalar which refers to %session
with the same name: $session = \%session
I know I could use -> notation, but I thought this would work:
$%$session{_session_id}
or
$$session{_session_id}
or some other variation using appropriate parentheses.
Is it possible to dereference this reference in this way to get at the
value?
value out of a hash using a reference. To be specific:
$session{_session_id} is the hash value I need to get at. Just to
make things interesting, I named my scalar which refers to %session
with the same name: $session = \%session
I know I could use -> notation, but I thought this would work:
$%$session{_session_id}
or
$$session{_session_id}
or some other variation using appropriate parentheses.
Is it possible to dereference this reference in this way to get at the
value?