#!/usr/bin/perl -w use strict; use Data::Dumper; my %a; { no autovivification 'exists'; if (exists ( $a{'abd'}->[0] ) ) { print "yes \n"; } } print Dumper \%a; if (exists ( $a{'abd'}->[0] ) ) { print "yes \n"; } print Dumper \%a; __END__ $VAR1 = {}; $VAR1 = { 'abd' => [] };
In reply to Re^2: restricting values to a nested datastructure
by Marshall
in thread restricting values to a nested datastructure
by babp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |