Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Reading 60k lines in file

by vitoco (Friar)
on Oct 08, 2009 at 20:40 UTC ( #800092=note: print w/ replies, xml ) Need Help??


in reply to Reading 60k lines in file

Is there a good reason to read and keep all that lines in an array? I don't see a sort or such...

Try the following:

... open(MYINPUTFILE, "<$load_file"); # open for input while (my $line = <MYINPUTFILE>) # loop thru list { chomp $line; my ($hash, $JPG) = ($line =~ m!/([^/]+)/([^/]+)$!) or die; ...

Update: restored $line var into this code.


Comment on Re: Reading 60k lines in file
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-12-20 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls