#!/usr/bin/perl use strict; use warnings; use 5.010; require IO::Uncompress::Gunzip; IO::Uncompress::Gunzip->import(qw(gunzip $GunzipError)); if (gunzip('x' => 'y')) { } else { die "gunzip failed: $GunzipError\n" }