in reply to Is there a limit of files I can decompress and then open in a script, if I close each one before openning other?

Operating systems limit how many files are opened *at a time*, but they don't limit how many files a process can open over its lifetime.

I don't see anything that would cause your problem, but I do have issues.

I'd recommend:

sub proc{ my ($file) = @_; # (...) my $pathC = $path . "/$file"; open my $input, "zcat $pathC|" or do { print STDERR "\n!!ATTENTION:\n\tUnable to run zcat: $!\n"; return; }; while (my $line = <$input> ){ # (...) data proccessing irrelevant to the problem } # Not needed. Will happen automatically # when $input goes out of scope. #close($input); }
  • Comment on Re: Is there a limit of files I can decompress and then open in a script, if I close each one before openning other?
  • Select or Download Code