in reply to How do you check if a key exists without creating it ?
no autovivification;
if( exists $foo->{bar}{anything}{you}{want} ){ }
Or
use Data::Diver 'Dive';
if( my $want = Dive( $foo, qw/ bar anything you want / ) ){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do you check if a key exists without creating it ?
by exilepanda (Friar) on Oct 06, 2012 at 09:00 UTC |