Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: About text file parsing

by Marshall (Canon)
on Aug 29, 2018 at 15:01 UTC ( #1221323=note: print w/replies, xml ) Need Help??


in reply to About text file parsing

Processing 50 million lines is going to be "slow".

Do not push to an array if you can process the line right now!

while(<FILE>) { if(/^sample\s+(\S+)/){process_sample($1)} if(/^good\s+(\S+)/) {process_good($1)} }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2020-11-23 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?