There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes, grep is the correct operator, not map. See - I did bork my code. :-)
As for the +5M lines thing - that becomes a function of your available RAM. Your string solution will hit the same limit, but at around 20-30M (if 5M is your limit with hashes). Note, your code to build the hash string will bomb faster than your code to iterate through it because you use foreach instead of while to iterate through the list. This creates a copy of the list you're foreach'ing through whereas while does not. My criteria for good software:
In reply to Re^4: Finding an intersection of two sets, lean and mean
by dragonchild
|
|