Here are different ways to create an empty hash named "hash".
my %hash;
my %hash = ();
Keys that contain no values (empty keys) can be created like this.
%hash = (
name_key => "",
id_key => "",
department_key => ""
);
Or, like this.
$hash{name_key} = undef;
$hash{id_key} = undef;
$hash{department_key} = undef;
Or, like this.
$hash{name_key} = "";
$hash{id_key} = "";
$hash{department_key} = "";
Dumper can be used to display the structure of the hash.
use Data::Dumper;
print Dumper \%hash;
Which will display the data structure of the hash.
$VAR1 = {
'name_key' => '',
'id_key' => '',
'department_key' => ''
};