"be consistent" | |
PerlMonks |
Re^4: Finding an intersection of two sets, lean and meanby dragonchild (Archbishop) |
on Jun 29, 2005 at 15:00 UTC ( [id://471053]=note: 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 Section
Cool Uses for Perl
|
|