Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to do a check like
if (exists $h{A} and exists $h{A}{B} and exists $h{A}{B}{C}) { }
Is there a way to do this more compactly? (Check for existence of a key without auto-vivifying the path?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: recursive exists in perl
by ikegami (Patriarch) on Dec 09, 2010 at 23:02 UTC | |
by gsiems (Deacon) on Dec 10, 2010 at 02:49 UTC | |
by Anonymous Monk on Dec 10, 2010 at 02:54 UTC | |
by gsiems (Deacon) on Dec 10, 2010 at 03:24 UTC | |
|
Re: recursive exists in perl
by moritz (Cardinal) on Dec 09, 2010 at 22:20 UTC | |
|
Re: recursive exists in perl
by Anonymous Monk on Dec 09, 2010 at 22:49 UTC | |
|
Re: recursive exists in perl
by JavaFan (Canon) on Dec 09, 2010 at 22:16 UTC |