On Jul 29, arichmond(contr-ird) said:
>I have a file I am trying to read and write to, it's obviously opening
>it ie.. No errors but not writing to it.
>
> Since no errors are being produced I can't figure out why?
You are opening a file for appending and reading. But you forgot (or
didn't know) that you start out at the *end* of the file.
>open (DONE,"+>>$done") or die "Cannot open file: $!";
>
> flock (DONE, 1);
You should really be using Fnctl.pm's file locking constants instead of
numbers here.
Anyway, here is where you should say:
seek DONE, 0, 0;
to rewind to the beginning of the file.
> foreach (<DONE>){
Don't do that. Use a while loop instead, PLEASE.
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>