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

Re^2: String searching in file

by cbtshare (Monk)
on Feb 09, 2018 at 22:06 UTC ( #1208865=note: print w/replies, xml ) Need Help??

in reply to Re: String searching in file
in thread String searching in file

Thank you very much, I see what you have done, checking if the file exists, opening it for reading, then opening it again for writing.I was kinda trying to avoid that, and just skip those extra steps and search if it ip address is in the file to begin with, if not write to it. Is there no way to do that, without opening the file for reading and writing?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2020-08-07 15:57 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (46 votes). Check out past polls.