my %words; %words = (...); # or you can do the initialisation right away my %words = (...); # the same goes for the other variables my $name = <>;