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 20: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)