Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Removing duplicates lines

by Not_a_Number (Prior)
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> )

Replies are listed 'Best First'.
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?
[choroba]: makes sense
[1nickt]: Tux Wow, interesting! He seems to say that there is no real protection in Excel other than common sense. Nice story about the Dutch police using the exploit to bring down criminal networks on the Dark Web!

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (13)
As of 2017-10-18 11:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?