
davorg
Thaumaturge
/ Moderator
Jun 19, 2006, 5:27 AM
Post #2 of 6
(488 views)
|
|
Re: [abhisri] Perl script migration
[In reply to]
|
Can't Post
|
|
You are using a regex to check that the directory name is valid before checking for the existance of the directory. The regex is checking for word characters (\w), whitespace (\s), backslashes (\\), dollar signs (\$), dots (\.), dashes (\-) and colons (:). If your directory name contains anything other than those characters then the match fails and you'll get an error message. Of course, your new directory name contains characters that aren't on that list. Therefore the regex will always fail and you'll always get the message. You need to change the regex so that it checks for valid characters in a Unix directory name. -- Dave Cross, Perl Hacker, Trainer and Writer http://www.dave.org.uk/ Get more help at Perl Monks
|