http://qs321.pair.com?node_id=762972


in reply to Moving files and directories

Inside of double quotes, backslashes need to be escaped. Try my $inDir = "M:\\AllFiles" (and correcting other backslashes as well).

Note that if you had use warnings; at the top of the script, you'd see errors like "Unrecognized escape \A passed through scriptname.pl at line 8" which would be a flag indicating a potential problem.