Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: About text file parsing

by stevieb (Canon)
on Aug 29, 2018 at 14:36 UTC ( [id://1221306]=note: print w/replies, xml ) Need Help??


in reply to About text file parsing

Although I really like Discipulus's approach to parallel processing the file, I thought I'd throw out Tie::File as an option. I've used it a couple of times successfully years ago. It doesn't load the entire file at once; instead, it reads it in chunks and presents the file as an array.

Instead of doing:

while (<$fh>){ ... }

You'd do something like the following after opening the file with the distribution:

for (@fh){ ... }

Replies are listed 'Best First'.
Re^2: About text file parsing
by haukex (Archbishop) on Aug 30, 2018 at 21:53 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-20 01:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found