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

Re^3: Use hashes instead of grep

by ColonelPanic (Friar)
on Nov 15, 2012 at 11:15 UTC ( #1003990=note: print w/replies, xml ) Need Help??

in reply to Re^2: Use hashes instead of grep
in thread How to grep exact string

Yes, but this method is not clearly superior if arrays are needed for other purposes. The array comparison is simpler, uses less memory, and will be fast unless both files are huge.

When's the last time you used duct tape on a duct? --Larry Wall

Replies are listed 'Best First'.
Re^4: Use hashes instead of grep
by Anonymous Monk on Nov 15, 2012 at 14:18 UTC

    Or, as Darth put it:

    The time to build the structure is insignificant compared to the power of the hash!
Re^4: Use hashes instead of grep
by space_monk (Chaplain) on Nov 15, 2012 at 14:01 UTC
    The code to implement the hash version isn't significantly more complex - see the version in another nodelet for how it would go.
    A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003990]
Tux is digging into a File::Temp blocker bug for perl5 (AIX and HP-UX and most likely also other OS's)
LanX don't dig to deep, you might get trapped in the hole

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2018-04-26 19:38 GMT
Find Nodes?
    Voting Booth?