Yes, I tried all that..... (thanks)
This is very odd... turns out that when I tried to do a regular 'mv' command
under Unix, it too said "success" ($?=0).... I found that the mount I have
my file system is non-standard Unix, so while the OS thought everything was
okay, it really wasn't. I'm using some HP proprietary network mount.
Go figure %-/
-Jeff
--- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote:
> Jeff Westman wrote:
>
> > Why doesn't my rename() work? It is returning a '1', meaning success (I
> get
> > the "has been modified" message below. Yet when I list the files (ls),
> it
> > shows the original file name and my tmp file name. The rename doesn't
> seem
> > to work.
> >
> > Any ideas?!
> >
> > ....
> > close(IN) or warn "cannot close file $inFile: $!\n";
> > close(TMP) or warn "cannot close file $tmpFile: $!\n";
> > ....
> > $rc = rename($tmpFile, $inFile) or die "Could not rename files:
> $!\n";
> > print "RC = $rc\n";
> > if (! $rc) {
> > warn "Rename failed: $!\n";
> > }
> > else {
> > print "File $inFile has been modfied\n";
> > }
> >
> > -Jeff
>
> Hi Jeff,
>
> The code you have looks fine, presuming both fiiles are in the current
> directory. It might help to see more of the context. Have you tried
> pritning both filenames, as well as checking the tmp file before and after
> running the script to ensure that it has been modified?
>
> Joseph
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]