> I am calling this subroutine like this but I can't get it to accept passing @keylist to it.
changing
recurse_hash(\%$decoded_json_obj,"@keylist");
to
recurse_hash(\%$decoded_json_obj,@keylist);
should do.
And please, Perl has variable interpolation, so never put variables into doublequotes if you don't them to be expanded.Use single quotes!
HTH =)
Cheers Rolf
( addicted to the Perl Programming Language)
> If I hardcode the key names like so it doesn't error and prints all all the corresponding values but they are all on different lines and don't match up.
I don't understand, could you show us the problem with your input?
In reply to Re: Traversing a complex data structure searching for certain keys and printing their values
by LanX
in thread Traversing a complex data structure searching for certain keys and printing their values
by newperluser2013
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |