Problems? Is your data what you think it is? | |
PerlMonks |
RE: Odd file renameby muppetBoy (Pilgrim) |
on Jun 14, 2000 at 16:32 UTC ( [id://18080]=note: print w/replies, xml ) | Need Help?? |
You could, for the last part of lhowards answer use
instead of the link/unlink block - Although his answer is more robust if your OS supports it. Update:I think Corion is correct, its been a long day.... I was thinking vaguely of the possibility of a race condition when using rename if another process is attempting to read the file. Is this possible? and if it is would flock sort things out. Also error handling would/could be better with the link/unlink method.
In Section
Seekers of Perl Wisdom
|
|