Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by pwagyi (Scribe)
on Feb 19, 2019 at 03:35 UTC ( #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
Node Status?
node history
Node Type: note [id://1230132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2019-03-22 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How do you Carpe diem?





    Results (113 votes). Check out past polls.

    Notices?