in reply to Hopefully a simple mistake

That's truly bizarre. Three recommendations. First, check the open and close statements, just to be sure: open (FILE2, ">$file") || die "can't open $file: $!"; Second, use select on your FILE2 filehandle to make that the default output. You can rewrite the problem area as:
select(FILE2); $lineout = "$temp1 = $temp2\n"; print $lineout; print STDERR $lineout;
I removed the double-quotes because they're probably not necessary in this case. You might also use ">>$file" in the open statement for debugging purposes. It appends to the file.

The last recommendation is to print to STDERR the $temp1 and $temp2 variables after you split them. That's low on my list of things to check, though. Best of luck... that's all I can think of.

Replies are listed 'Best First'.
RE: Re: Hopefully a simple mistake
by ChuckularOne (Prior) on Apr 14, 2000 at 02:07 UTC
    I wasn't using -w (I feel silly)

    Being an initiate I made a rooky mistake. :-)
    The error was closing the file one level too early in the curly braces.
    I was writing to a closed file. I still don't know how the file was being changed, but there are other logic errors. I'll find them now.

    Thank you all for your suggestions and help.

    Your humble servant,
    -Chuck