general comment: If the only choices are on & off ("Y" & something else), use "boolean" values instead -- it will make things a lot easier and cleaner cause you'll avoid code like
(or worry about case).. use 1 (or another non-zero number) for true and 0/undef for false. Then you can just do
. (Depending on the usage you could just do
as well ..). A good reference is