Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: How do I verify that a copied file's contents did not corrupt/modify?

by idnopheq (Chaplain)
on Mar 14, 2001 at 14:56 UTC ( [id://64405]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: How do I verify that a copied file's contents did not corrupt/modify?
in thread How do I verify that a copied file's contents did not corrupt/modify?

Works like a charm! A few questions to help illuminate my mind, if I may.

I'm looking at the perlfunc entry for open, and I remain a little hazy regarding the subtle difference between ">" truncating and "+>" clobbering. I'm digging through the holy texts and references now, but if you care to pass more wisdom my way ...

The sysseek is a nice touch. I take it that since $outFile was not at the beginning of the file when I passed the filehandle to Digest::MD5, it somehow changed the hashing algorithm's output? Like only hashing from the current position to the end?

THX!
Dex

  • Comment on Re: Re: Re: How do I verify that a copied file's contents did not corrupt/modify?

Replies are listed 'Best First'.
Re: Re: Re: Re: How do I verify that a copied file's contents did not corrupt/modify?
by jeroenes (Priest) on Mar 14, 2001 at 15:11 UTC
    Dex,

    I actually had to look it up myself (Shhh... don't tell anybody). The + modifies the > or < redirections to 'both ways'. That means, '+>' first opens for writing, but allows reading as well. So you start with an empty file, guaranteed. '+<' the other way around.

    Your 2nd question: Yes. With the remark that you're already at the end, so there is very little to hash on ;-).

    Cheers

    Jeroen

    "We are not alone"(FZ)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://64405]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.