igoryonya has asked for the wisdom of the Perl Monks concerning the following question:
I pass some portion of the variable as a reference somewhere:my %complex = ( key_of_hash=>{ opt1=>val1, opt2=>val2 }, key_of_arr=>[ 38,'abc',-1829, ['element0',8979,'something else'] ] );
Is there a perl's built-in way to get a reference of the parent, containing subarray, whose reference is saved in $complexSubVarRef?my $complexSubVarRef = $complex{'key_of_arr'}[3];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting a parent of a sub (array|hash) in a complex variable
by choroba (Cardinal) on Mar 01, 2018 at 06:28 UTC | |
|
Re: Getting a parent of a sub (array|hash) in a complex variable
by LanX (Saint) on Mar 01, 2018 at 11:37 UTC | |
|
Re: Getting a parent of a sub (array|hash) in a complex variable
by thanos1983 (Parson) on Mar 01, 2018 at 11:12 UTC |