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

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 ./aaa.pl 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128060]
help
Chatterbox?
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
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?