title: Processing a file with multithreading in perl
body: <p>I am looking for a generic process in PERL similar in concept to a mapreduce in which given an input file in perl, I can have #N (user specified number) different file handles which reads from the different parts of the file. </p>
  
  <p>In other words instead of reading file through one handle I would like to read it from #N different blocks simultaneously. To do this I ideally would prefer not to first divide the files in to #N different sub files. It will be nice if a single file could be read from different locations through non interfering file handles with out any data leak.</p>
  
  <p>The downstream goal is to run #N mapper like jobs on the data read by each file handle and then once everything is done I use a reducer like thing to merge the output of each mapper.</p>
  
  <p>Let me know if this makes sense. It is just a simple thing in my mind to leverage multicores machine we have on the existing per code base with some changes. May be something similar is already out there.</p>
  
  <p>I would appreciate your comments.</p>
  
  <p>Thanks!
  -Abhi </p>