my $n = scalar(keys %$ref); if ($n == 0) { return 0; } return 1;