I agree with the previous message that recommended the use of $!. You need to find out why the open command isn't working. The error message from dealError() isn't telling you anything useful. Try replacing your
open line with:
open INPUT, "zcat $pathC|" or die "Can't open $pathC: $!";