Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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
Replies are listed 'Oldest First'.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (18)
As of 2015-07-07 16:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls