- or download this
if ($reftype eq 'REF' || $reftype eq 'SCALAR') {
clean($$node);
$node = undef if !defined($$node);
} els
- or download this
sub clean {
our $node; local *node = \$_[0]; # Alias
...
$node = undef if !keys(%$node);
}
}
- or download this
[[[],[],["b"]],"a"]
[[["b"]],"a"]
[[[],[],[]],"a"]
["a"]
- or download this
my $n = scalar(keys %$ref);
if ($n == 0) {
return 0;
}
return 1;
- or download this
return keys(%$ref) ? 1 : 0;
- or download this
return keys(%$ref);