Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Edit huge file

by pvaldes (Chaplain)
on Jun 19, 2013 at 22:34 UTC ( #1039858=note: print w/ replies, xml ) Need Help??


in reply to Edit huge file

I am needed to edit a large, 500+ megabyte file in Perl, to remove one line near the beginning of the file, and one near the end

(... This problem reminds me to head and tail programs...) you could use head to obtain the line, read to pick up just the first X characters of a file and then overwrite this line, maybe using also seek. Just some untested ideas...


Comment on Re: Edit huge file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-09-22 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (177 votes), past polls