in reply to How to test if a file is gzipped or not
open(FOO, "zcat $foo |") || open(FOO, $foo) || die("ERROR: Unable to o +pen file $foo for read: $!"); [download]