in reply to reg exp to find presence of value in a list of comma seperated list
http://perldoc.perl.org/functions/grep.html
Just search the list returned by grep to see if it's empty or not.