in reply to Re^3: How to uncheck one checkbox if some other is checked
in thread How to uncheck one checkbox if some other is checked

That would be something like this, then.

my %checked = map { $_ => 1 } $qry->param("GRU$Za"); if (keys %checked > 1) { delete $checked{'E'}; } elsif (keys %checked == 0) { %checked = ('E' => 1); }

I'd still document it in the UI; it sounds like behaviour that is likely to cause confusion.