The problem is that you're creating directories with:
mkdir "trip", 077;
You most likely wanted 0777, or you can omit the mask parameter completely and Perl will do the right thing for you :-)
Moreover, a quick inspection of @files revealed the other possible problem: the special directories . and .. are included in the array, and your script is trying to rename them as well. I couldn't test it on Windows (using Linux here) but it should be the same.
Update: mentioned that @files contains . and ..
In reply to Re: directory access failure
by trantor
in thread directory access failure
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |