What do you mean delete? Permanently remove,
or remove for the current instance/session?
I ask because in the context of CGI this sounds a little odd.
An alternative to a flat file would be a DBM.
With DBM I would start with the values set to 1,
and en lieu of deleting the key set the value to 0;
that ought to be very IO (UPDATE: and memory) efficient.
--
perl -pew "s/\b;([mnst])/'$1/g"