title: Look up and matching of string between 2 files
body: <p>I have two files in zipped format</p>
  
  <p><strong>file1.gz</strong></p>
  
  <pre><code>a2345
  b1212
  11212
  f1212
  derer
  ...
  ...
  ..
  01234
  </code></pre>
  
  <p><strong>file2.gz</strong></p>
  
  <pre><code>g,a2345,1,2,3,4,5,6,7,a,v,c
  f,b1212,2,5,6,7,8,9,0,1,2,3
  d,f1212,7,8,a,b,c,w,e,r,t,y
  ....
  ....
  </code></pre>
  
  <p>I have to read file1.gz line by line and do a lookup in each line of file2.gz and if it matches then re-direct to one more file called file 3.</p>
  
  <p>Please remember my <strong>file1.gz has 1 million lines</strong> and <strong>file2.gz has 5 million lines</strong> and so I need some work around in perl so that it consumes low resource in my Solaris server.</p>
  
  <p>If a perl script can be worked by reading the content in zip file that would be of really great help.</p>