in reply to How to test if a file is gzipped or not
Instead of using zcat you might consider using core Perl or CPAN modules.
Core Perl:
CPAN:
See also:
👁️🍾👍🦟