title: Capturing output of perl script called through pipe from another perl script
body: <p>Here is the code snippet of main script. The main script is calling populate_details script through pipe. Sending 2 arrays inv1 and inv2 as input.</p>
  
  <pre><code> *my $fh = FileHandle-&gt;new('| ./populate_details') 
   print $fh Data::Dumper-&gt;Dump([\@inv1], [qw(inv1)]);
   print $fh Data::Dumper-&gt;Dump([\@inv2], [qw(inv2)]);*
  </code></pre>
  
  <p>The question is , how to capture the return code and return value from populate_details script ? For example, the populate_details script is sending as hash of return values.</p>
  
  <p>Could you Please help ?</p>