|Think about Loose Coupling|
Re: Pattern match arrayby thezip (Vicar)
|on May 07, 2008 at 15:09 UTC||Need Help??|
This would better be coded using a hash:
If you absolutely need to have the @prim array, then create the hash on-the-fly using map:
After reading moritz's take on this, his seems to be what you're looking for.
I was somehow thinking that you were parsing chunks (ie. words) and then seeing if that word existed in your array/hash.
moritz is also spot-on mentioning that you're not handling the newlines at the ends of lines.
Your wish is my commandline.