Closed cheoljoo closed 3 years ago
use isDefinedHash()
our %macro = {};
if(isDefinedHash("macro{test}{0}") eq ""){
print "it is not accessed\n but $macro{test} was defined\n";
}
foreach my $key (keys %macro){
print "$key\n"; # print nothing
}
if we access $macro{test}{0} , perl makes $macro{test} room.