in reply to checksum error in Archive::Tar

Win32 == binmode your binary file handles, perl does on the fly conversion between \r\n CRLF and \n on Win32 which is probably the issue. You may have to binmode STDIN and STDOUT as well.

binmode THEFILE; # :-)

BTW you have heard of die it will print an error message for you and exit with a true value like for example 1 so do{print "Could not close $file: $!\n"; exit 1}; is what most people would write as just die "Blah $!\n"

cheers

tachyon

Replies are listed 'Best First'.
Re: Re: checksum error in Archive::Tar
by muba (Priest) on Mar 17, 2004 at 09:54 UTC
    Could that be the problem? Since I do not open binary files myself: the Archive::Tar module handles reading and saving the archive files... but maybe binmode is the corner I should look... I'll examine the module.
    I did not use 'die' to prevent the 'at d:\exec\perl\cn\pack.pl line 47' (or whatsoever) message
    
    my $native_language = "Dutch";
    my $code = not $tested unless $specified{$otherwise};