use strict; use warnings; #this is better syntax for creating a hash my %game_count = ("Great" => 0, "Boring" => 0, "None" => 0); my $game = "Great"; # no warning $game_count{$game} = $game_count{$game} + 1; #### use strict; use warnings; #this is better syntax for creating a hash my %game_count = ("Great" => 0, "Boring" => 0, "None" => 0); my $game = "Something"; # this yields the warning $game_count{$game} = $game_count{$game} + 1;