#!/bin/perl use AnyDBM_File; dbmopen(%states, "statedb", 0666) || die; TRY: { print "state abbreviation to remove. "; chomp($abbrev=<STDIN>); $abbrev = uc $abbrev; delete $states{"$abbrev"}; print "$abbrev removed.\n"; print "Another entry? "; $answer = <STDIN>; redo TRY if $answer =~ /Y|y/; } dbmclose(%states);