> > I have a script where I need to open a file, read from it
> > sequentially,
> > and append items to the file as I go along, continuing to read these
> > items as I go. But seems I can't open the file for read and append at
> > the same time. Does anyone have any ideas?
> 

Is it possible to open a file +>> mode to read and append? 

Like,

Test.log
hi
bye

#!/usr/bin/perl
open FD, +>>"test.log"
while (<FD>)
{
  print FD;
}
close FD;

Thanks.

-Muthu

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to