Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Removing duplicates lines

by Not_a_Number (Parson)
on Sep 04, 2013 at 20:15 UTC ( #1052436=note: print w/ replies, xml ) Need Help??


in reply to Re: Removing duplicates lines
in thread Removing duplicates lines

Small remark.

foreach my $line ( <FILE> )  #### do NOT read entire files into memory if they are big.

With foreach, you ARE reading the whole file into memory!

Use while:

while ( my $line = <FILE> )


Comment on Re^2: Removing duplicates lines
Select or Download Code
Re^3: Removing duplicates lines
by zork42 (Monk) on Sep 05, 2013 at 12:01 UTC

    Doh!

    Thanks for pointing that out!
    I've updated my post to remove my stupidity :)
    ++

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (11)
As of 2014-12-22 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (128 votes), past polls