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

Re: Best way to edit a file?

by cdarke (Prior)
on Apr 02, 2007 at 13:32 UTC ( [id://607819]=note: print w/replies, xml ) Need Help??


in reply to Best way to edit a file?

You could open the file for read and write, find the line of interest, seek backwards to start of line, then overwrite it. BUT, I agree with MonkE.
Text files lines are usually variable length. This means that for the single file approach to work the new line must be exactly the same length as the original.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-04-19 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found