Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: check *.tmp wether it's a zip or not

by guha (Priest)
on Nov 26, 2004 at 15:34 UTC ( #410593=note: print w/ replies, xml ) Need Help??

in reply to Re^2: check *.tmp wether it's a zip or not
in thread check *.tmp wether it's a zip or not

perl -e "{ local $SIG{__WARN__} = sub { die @_;};eval {warn 'xxx'}; pr +int 'a:'. $@}" __OUTPUT__ a:xxx at -e line 1.

That is check $@ for success.

If you only check the signature, which is what my quick check into File::Type confirmed that it is doing, there is a risk even if it is remote that another binary file could start with these magic bytes.

Comment on Re^3: check *.tmp wether it's a zip or not
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2015-12-01 03:23 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (792 votes), past polls