title: Perl - parsing huge *.gz file in Windows
body: <p>I'm trying to parse big *.gz file using Perl in Windows. </p>
  
  <p>In Solaris I'm able to use following construction:</p>
  
  <pre><code>my $cmd = "zcat $dir/$file|";
  open FILE, $cmd or die "$cmd:$!";
  
  while (&lt;FILE&gt;) {
  .
  .
  .
  }
  </code></pre>
  
  <p>and it works fine.
  In Windows I'm tring to use <a href="http://search.cpan.org/perldoc?IO%3a%3aZlib" rel="nofollow">IO::Zlib</a> module, e.g.</p>
  
  <pre><code>my $fh = IO::Zlib-&gt;new("$file", "rb");
  while (my $line = $fh-&gt;getline()) {
  .
  .
  }
  </code></pre>
  
  <p>but I'm running out of memory. (I have 4GB RAM on my system). Is there any other method to parse big *.gz file?</p>