I have noticed the Windows version of AS Perl tend to lock files hard. You need to kill the perl that has the file open before you can write or delete the file.
I had this problem with Archive::Zip... I have to close each zip member, and then the zip before I can even rename the zip file!