Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Re: Using OPEN to append to a file

by /dev/trash (Curate)
on Oct 20, 2002 at 00:46 UTC ( #206595=note: print w/replies, xml ) Need Help??

in reply to Re: Using OPEN to append to a file
in thread Using OPEN to append to a file

I've run it a couple of times and seems to work but it leaves one line in the US Robotics log file, which causes a dupe when it's run again. I just ran it again and the whole US Robotics file was cleared except for that one line.

Replies are listed 'Best First'.
Re: Re: Re: Using OPEN to append to a file
by jjdraco (Scribe) on Oct 20, 2002 at 00:54 UTC
    should be able to make acouple of small edits to it to get rid of that blank line. Is that blank line a big deal or can you live with it, I for one would like it, then it leaves breaks inbetween writes.

    Update: ok take another look at the code again I added a pop line to get that line off the file, the program was leaving the first element of the array in the file so I pop it off in to nothing, probably not the best thing to do but I'm not sure what else would work. after all by just setting $#log to 0 aren't I just loosing the whole file in memory somewhere. I'm not sure

    learning Perl one statement at a time.
      Well it wasn't a blank line it. It was like you said later the first element of the array in the file.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://206595]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (None)
    As of 2021-10-16 16:12 GMT
    Find Nodes?
      Voting Booth?
      My first memorable Perl project was:

      Results (69 votes). Check out past polls.