develooper Front page | perl.perl5.porters | Postings from January 2004

Storable Magic number checking failed

Thread Next
From:
Andy Ford
Date:
January 29, 2004 09:54
Subject:
Storable Magic number checking failed
Message ID:
1075224200.2014.57.camel@evo@telindus.co.uk
Hi perl5 porters

I'll apologise now if I am contacting the wrong people with respect to
this error.

I have a perl script that is freezing a complex hash, writing it to a
file and then thawing it. At the thaw stage I get the error ....
Magic number checking on storable string failed at ../../lib/Storable.pm
(autosplit into ../../lib/auto/Storable/thaw.al) line 358, at etc etc
etc

The details are as follows......

OS: Solaris 2.8
Perl: v5.8.1
gcc version 2.95.3 20010315 (release)

code snippet
---- start script 1 -----
my $ds = {};
# fill up $ds here
my $fds = freeze $ds;

open(FILE, ">/tmp/FileTransfer/$ip");
print(FILE $fds);
close(FILE);
---- end script 1 ---

----- start script 2 ----
 open(FILE, "/tmp/FileTransfer/$ip");
 my @dfs = <FILE>;
 close(FILE);
 my $df = join('', @dfs);
$hashref = thaw $df;
---- end script 2 -----

I have done an extensive search for this error message on Google and
various support forums but manage to find nothing concrete.

The man differences between perl 5.6.1 / Storable version 2.06 (yes it
worked in this version) and perl 5.8.1 / Storable version 2.08 is ....

>From perl -V
(5.6.1) useperlio=undef
(5.8.1) useperlio=define

Any help would be much appreciated.

Thanks

Andy
-- 

perl -e 'print qq^;@) [###]^^qq^z\.MY{eLQ9^'
in:control developer, Telindus, RG27 9HY
DDI: +44 1256 709211, GSM: +44 7810 636652


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About