Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Fastest way of changing the beginning of a txt file..

by pwagyi (Monk)
on Feb 19, 2019 at 03:35 UTC ( [id://1230132]=note: print w/replies, xml ) Need Help??


in reply to Fastest way of changing the beginning of a txt file..

>> is there any way to tell the OS some thing like: "Set actual FILEHANDLE's position as the file-start postion"??? in a way that if i close the FILEHANDLE, then the file will only have valid lines... Your best bet is to copy the only part of the file you want and write to new file, and rename the file. You cannot shrink a file nor insert in the middle in-place. you could append/overwrite at the end.

  • Comment on Re: Fastest way of changing the beginning of a txt file..

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2024-04-23 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found