#!/usr/bin/perl my %a = ( 'a' => '111' ); %a = (); print "test_1" if ( %a ); print "test_2" if ( defined( %a ) ); #### use strict; my %a = (); ## This is the change. print "test_1" if ( %a ); print "test_2" if ( defined( %a ) );