in reply to Opening zip'd files

This seemed to work for me:
open GZ, "|gzip -dc foo.gz" or die "Can't open pipe: $!"; my $buf; print $buf while read GZ, $buf, 1024; close GZ or die "Can't close pipe: $!";
You don't have to worry about checking for SIGPIPE cause you only get that when writing to a pipe.