my %lookup = ( "Alabama" => "southern.txt", "Alaska" => "northern.txt", .... ); my $file = $lookup{$input_state};