Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Read Some lines in Tera byte file

by marto (Bishop)
on Oct 13, 2010 at 06:21 UTC ( #865018=note: print w/replies, xml ) Need Help??


in reply to Read Some lines in Tera byte file

Isn't this the same question as How to read 1 td file? Perhaps mount the remote disk and use something like Tie::File, or run your script on the remote server.

Replies are listed 'Best First'.
Re^2: Read Some lines in Tera byte file
by BrowserUk (Pope) on Oct 13, 2010 at 06:55 UTC
    use something like Tie::File,

    Please try this yourself--say read the middle line in a 1 or 2GB file--before suggesting it to others.

      I posted from my phone, I couldn't realistically try this at the time. It is, as I suppose you're suggesting, pretty darn slow. I'd used Tie::File in the past, but not with files this large.

      Cheers

        Tie::File remembers the position of the lines it has encountered. Not problem if you want to read lines 100 to 200.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://865018]
help
Chatterbox?
[LanX]: YT=youtube
[Discipulus]: ;=) yes i'm not SO dumb
[LanX]: SO=StackOverflow
[Discipulus]: :=(
[perldigious]: I watched some video on YT awhile back with auto-subtitle on and the speaker had a very thick cockney sort of English accent... hillarity ensued in the subtitles.
[Discipulus]: IHAA=I hate acronyms anyway

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-06-23 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (552 votes). Check out past polls.