you can either set RaiseError, or check the returned set.
ps. you can also use scalar(@array) for the size of an array, and scalar(keys %hash) for the size of a hash.
print "none: ". scalar(keys %none) . "\n";
print "more: ". scalar(keys %more) . "\n";