I rarely use the old $$ syntax these days so I would do this:
use strict; use warnings; use Data::Dumper; my $session_data = { azuread => { login_info => { roles => [ 'Medewerkers', 'etm' ] } } }; print Dumper $$session_data{azuread}{login_info}{roles}; # Like you ha +d print $session_data->{azuread}{login_info}{roles}[0] . "\n";
It just makes the dereferencing easier to me. See also perldsc for more general info on this.
🦛
In reply to Re: Reading session data
by hippo
in thread Reading session data
by PeterKaagman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |