>if ($fileName =~ /\W+/) { Use: if ($fileName =~ /[\W+\.]/) { The "[]" says "either this thing, or this thingy, or this thingy. You'll notice this in the other regexp too that I posted: /:([^:]$.*)$/ In this case, we're saying "get everything between a : character and the end of the string ($), UNLESS (^) there's a :"... -- Morbus Iff ( .sig on other machine. ) http://www.disobey.com/ && http://www.gamegrene.com/ "where's there's a will, there's a morbus ready to collect!"
- [MacPerl] checking for illegal characters in file name Katherine Richmond
- Re: [MacPerl] checking for illegal characters in f... Morbus Iff
- Re: [MacPerl] checking for illegal characters in f... Ronald J Kimball
- Re: [MacPerl] checking for illegal characters ... Detlef Lindenthal
- Re: [MacPerl] checking for illegal characters in f... Morbus Iff
- Re: [MacPerl] checking for illegal characters in f... Katherine Richmond