Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: File Checking

by eg (Friar)
on Jan 29, 2001 at 01:14 UTC ( [id://54884]=note: print w/replies, xml ) Need Help??


in reply to Re: File Checking
in thread File Checking

Hey slycer. You're looping around your data far too often.

while ( <WORDLIST> ) { print OUTFILE unless $list{lc($_)}++; }

will be up to three time faster as it only needs to go through the data once.

(Whoops! This is essentially what IO said.)

Replies are listed 'Best First'.
Re: Re: Re: File Checking
by the_slycer (Chaplain) on Jan 29, 2001 at 01:37 UTC
    Yah, I wrote that probably about 6 months ago as kind of a learning excersise.. I knew as soon as I posted it that it could be better, but oh well. Thanks for pointing out the errors :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found