Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Openind file for read+append

by Riales (Hermit)
on Feb 08, 2012 at 18:41 UTC ( #952554=note: print w/ replies, xml ) Need Help??


in reply to Openind file for read+append

Have you looked into using the 3-argument form of open? It's safer just in case $host_file starts with a '<' or a '>'; this could change what your code does.

Beyond that, +> opens the file for both read/write but +< is probably better because +> would clobber the file first. I don't see where you are attempting to append anything to the file though...


Comment on Re: Openind file for read+append
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2015-07-08 08:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (98 votes), past polls