On 11 Nov 2005 at 7:02, kathyjjja wrote: > Hello everyone, > > I am trying to rename a file like this: > > rename($myFile, $newName); > > The program dies there and says "Permission Denied." > > What can I do in order to rename that file?
Not much if you don't own the file, have sufficient rights to rename it or if the file is in use by another program. I am not sure why it is dying as you haven't said rename($myFile,$newName) or die: $!\n"; you could rename($myFile,$newName) or warn "can't rename $myFile: $!\n"; and it would report the error and continue. I suspect you need to login as administrator and run this script again. HTH. Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
