Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: gunzip exception

by choroba (Archbishop)
on Feb 08, 2021 at 09:41 UTC ( #11128060=note: print w/replies, xml ) Need Help??

in reply to gunzip exception

Probably not related to your problem, but checking $@ is unreliable. Switch to
eval { $data = gunzip( $gz ); 1 } or { say "Can't unzip $file: $@"; exit 1 };

See Bug in eval in pre-5.14 for more details.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: gunzip exception
by luxs (Beadle) on Feb 08, 2021 at 10:44 UTC
    my $gz =''; my $data; eval { $data = gunzip( $gz ); 1; } or do { print "Error: $@"; exit; }; print "Done";
    Give me Attempt to uncompress empty string at ./ line 10. Done; Which is prevent script from die, but do not catch a fatal error.... Thank you for link to the bug

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128060]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2021-04-22 16:49 GMT
Find Nodes?
    Voting Booth?

    No recent polls found