my $gz = 'f'; my $data; eval { $data = gunzip( $gz );}; if ($@) { say "Something wrong"; exit; }; say "done";