ikegami, thanks for the replies and suggestions. They worked very well, thank you. I changed the
split(',', ...) statement per your suggestion. Also I deleted the unlink/undef lines because that was an artifact from the example I borrowed. I think it was originally intended to close down an input file handle if the user supplied one in the options - I don't need that.
For future reference, closing file handles is done with close, not unlink. Using undef or letting the variable go out of scope both do the trick as well.
I use the last option. I don't remember ever having to explicitly close a file handle in Perl.