sub inithash { my $h= shift; $h= { 'a'=>0, ... }; #note the curled braces %$h= ( 'a'=>0, ... ); #alternative to the previous line }