You might want to add the $^E and $! error variables in your output. I've been using rename with XP,W2k, and W2k3 for a few years now without problems.
Another thought: Make sure that it's working in the directory you think it is. It's pretty easy to accidentally copy the file somewhere else. -----Original Message----- From: Ed [mailto:[EMAIL PROTECTED] Sent: Friday, April 14, 2006 1:40 PM To: beginners@perl.org Subject: does rename have problems on W2K, W Server 2003, etc? I'm trying to do a simple file rename and am starting to pull my hair out. # Open the infile for read, no append, no create, no clobber open RIGHTSLISTFILE, "<$rightslistfilename" || die ("admin_user_ex : Error: Can not open file: $rightslistfilename \n"); # Open the outfile for write, no append, create nonexisting open TMPFILE, ">$tmpfilename" || die ("admin_user_ex : Error: Can not open file: $tmpfilename \n"); ... read from rightslistfile and write to tmpfile. ... close (RIGHTSLISTFILE); close (TMPFILE); ... $retval = rename $tmpfilename, $rightslistfilename; print "retval: $retval<br>"; retval is 0 and the target file never gets updated. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>