#!/usr/bin/perl
use AnyDBM_File;
dbmopen(%states, "statedb", 0666[a]) || die;
TRY: {
print "State Abbreviation:";
chomp($abbrev=);
$abbrev = uc $abbrev;
print "Name of the state:";
chomp($state=);
lc $state;
$states{$abbrev}="\u$state";
print "Another entry? ";
$answer = ;
redo TRY if $answer =~ /Y|y/;
}
dbmclose(%states);