Problems? Is your data what you think it is? | |
PerlMonks |
checking if hashref value exists based on a dynamic arrayby jonathan415 (Novice) |
on Aug 08, 2008 at 06:12 UTC ( [id://703051]=perlquestion: print w/replies, xml ) | Need Help?? |
jonathan415 has asked for the wisdom of the Perl Monks concerning the following question:
I have an hashref that has the following data.
and I have an array with the following data: I know that I could see if $href->{a}->{t}->{x}->{2008-08-07} exists by just typing: But that would be too statically hard encoded and manual. I am trying to find a more elegant way to see if the hashref exists based on a dynamically generated @array values that aren't known yet. That way I can generate the exists statement corresponding to whatever the array length and values are instead dynamically. Basically if the array turns out to be: I'd like to check if: exists without typing out "b, t, m, p".
Back to
Seekers of Perl Wisdom
|
|