![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
How do you get IO::Uncompress::Gunzip to error if the input file isn't a GZ file?by sectokia (Sexton) |
on Jun 19, 2020 at 04:28 UTC ( #11118250=perlquestion: print w/replies, xml ) | Need Help?? |
sectokia has asked for the wisdom of the Perl Monks concerning the following question: How do you get IO::Uncompress::Gunzip to error if the input file isn't a GZ file? Say I have files like:
And my test.pl script is:
Then...
None of those will die or give error (well test.random will if you are really lucky...) It seems to me that if the GZIP magic header is no present the input just copies to output instead of being error?
Back to
Seekers of Perl Wisdom
|
|