in reply to Re^3: Overwriting temp file
in thread Overwriting temp file

Thanks for replying so quickly. I'm not quite as advanced as you, and I understood most everything, except the following...

 my $outMode = '+>';

Is the +> telling the file to move out? What is the '+' for?

 open my ($outFh), $outMode, $outputFile;

Here, I know you open a filehandle and then there's the $outMode again (+>) and I'm assuming the name of the output file?

 $callBack->($outFh);

I'm just confused here.

 not $flag

I looked this up in perldocs. Does it return true if $flag = 0?

I didn't mean to turn this into a tutoring session, but it would help me out so much if I understood it! You've been a great help so far.Thanks.

Replies are listed 'Best First'.
Re^5: Overwriting temp file
by Khen1950fx (Canon) on Sep 21, 2011 at 22:57 UTC
    '+>' means that you want both read and write access, but note that it clobbers the file first. For a read/write update that doesn't clobber the file first, do '+<', for non-text files mostly. See: open.