Thank you kennethk. I am learning perl now. I found that this one also is working $commalist =~ /,$item,/. I know there might be more than one way to do this, but if you don't mind can you tell me the difference between the one you suggested and this one