Perl Rename function unreliable?
- From: "Rhugga" <chuck.carson@xxxxxxxxx>
- Date: 22 Jul 2005 16:01:32 -0700
Has anyone experienced problems using perl rename() function? We have
seen odd results using 3 different versions of perl. I have some code
that renames some oracle archive logs and out of a run of say 100 logs
it will fail to rename a handfull. I examine that file stats and they
are all identical in every possible way. (just different ctime/atime
etc...) Perms are identical. The files are not open by another process
(even though this doesnt matter per the documentation)
I even added a sleep(5) between each rename() call.
My OS types are a mix of Solaris 8 and 9.
I'm using the rename command as follows:
rename( $oldfile, $newfile) || die "Unable to rename $oldfile, manual
intervention required.";
Is using this any less robust:
`/usr/bin/mv $oldfile $newfile`;
Thx,
CC
.
- Follow-Ups:
- Re: Perl Rename function unreliable?
- From: xhoster
- Re: Perl Rename function unreliable?
- From: Paul Lalli
- Re: Perl Rename function unreliable?
- Prev by Date: Re: comments in the middle of a hash variable ?
- Next by Date: Re: compare two dates MMDDYYYY
- Previous by thread: FAQ 4.64 How can I get the unique keys from two hashes?
- Next by thread: Re: Perl Rename function unreliable?
- Index(es):