#!/usr/bin/perl use Test::Simple (tests => 9); use strict; use warnings; my %hash; &ok($^V eq "v5.32.1","Version = v5.32.1"); &ok(!%hash,"Empty: !\%hash"); &ok(!scalar(%hash), "Empty: ! scalar"); &ok(scalar(%hash) == 0, "Empty: 0 == scalar"); &ok(!keys(%hash), "Empty: ! keys"); ++$hash{entry}; &ok((%hash ? 1 : 0),"Not empty: \%hash"); &ok(scalar(%hash), "Not empty: scalar"); &ok(scalar(%hash) != 0, "Not empty: scalar != 0"); &ok((keys(%hash) ? 1 : 0),"Not empty: keys");