in reply to checking if hashref value exists based on a dynamic array
Not the best naming convention - but this is a sample (and it's getting late ...) ...my %z=(aa=>{bb=>{cc=>44}});; sub chk{ my ($v,$h)=@_; return 1 unless @$h; return 0 unless exists $v->{my $x=shift @$h}; return chk($v->{$x},$h) } print qq[found\n] if chk(\%z,[qw(aa bb cc)]);
Have you been high today? I see the nuns are gay! My brother yelled to me...I love you inside Ed - Benny Lava, by Buffalax
|
|---|