use warnings; use diagnostics; #### use strict; use warnings; use diagnostics; my $href; my %hash; %hash = %{$href}; --Error-- Can't use an undefined value as a HASH reference at line 8 (#1) (F) A value used as either a hard reference or a symbolic reference must be a defined value. This helps to delurk some insidious errors. Uncaught exception from user code: Can't use an undefined value as a HASH reference at line 8. #### use strict; use warnings; use diagnostics; my $href = {}; my %hash; %hash = %{$href}; --Error-- This caused no error #### use strict; use warnings; use diagnostics; my $href; my %hash; %hash = %{$href || {}}; --Error-- This caused no error also