J
JS
Hi,
I have some code to print from a multi-level hash that has been stored
using mldbm:
use MLDBM qw(DB_File Storable);
tie my %appstaffwk, 'MLDBM', $appstaffwkdb or die $!;
foreach $app (keys %appstaffwk){
$hashref=$appstaffwk{$app};
foreach $staffno (keys %$hashref){
print "\n$app:$staffno:$hashref->{$staffno}";
}
}
This seems to work fine on the other db files I made, but when I run it
on the following file:
-rw-r----- 1 32766 B8 1056768 Oct 31 09:35 appstaff-yr2003.db
It gives me the below error (when I have diagnostics switched on):
eBasis:818829:1
eBasis:106831:1
eBasis:738496:1
eBasis:654168:1
eBasis:652566:1
eBasis:705210:1Uncaught exception from user code:
Uncaught exception from user code:
Storable binary image v24.8 more recent than I am (v2.6) at
blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al)
line 364.
eval {...} called at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/thaw.al) line 364
Storable::thaw('1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
MLDBM::Serializer::Storable::deserialize('MLDBM::Serializer::Storable=HASH(0x20257444)',
'1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at /usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM.pm line 155
MLDBM::FETCH('MLDBM=HASH(0x200347e4)', 'BSafe') called at
../show_appstaffwk.pl line 39, at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
Carp::croak('Uncaught exception from user code:^J^IStorable
binary image v24.8 ...') called at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/logcroak.al) line 71
Storable::logcroak('Uncaught exception from user
code:^J^IStorable binary image v24.8 ...') called at
blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al)
line 365
Storable::thaw('1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
MLDBM::Serializer::Storable::deserialize('MLDBM::Serializer::Storable=HASH(0x20257444)',
'1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at /usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM.pm line 155
MLDBM::FETCH('MLDBM=HASH(0x200347e4)', 'BSafe') called at
../show_appstaffwk.pl line 39
I'm really stuck on this. Could anyone help me out please? Thanks.
JS.
I have some code to print from a multi-level hash that has been stored
using mldbm:
use MLDBM qw(DB_File Storable);
tie my %appstaffwk, 'MLDBM', $appstaffwkdb or die $!;
foreach $app (keys %appstaffwk){
$hashref=$appstaffwk{$app};
foreach $staffno (keys %$hashref){
print "\n$app:$staffno:$hashref->{$staffno}";
}
}
This seems to work fine on the other db files I made, but when I run it
on the following file:
-rw-r----- 1 32766 B8 1056768 Oct 31 09:35 appstaff-yr2003.db
It gives me the below error (when I have diagnostics switched on):
eBasis:818829:1
eBasis:106831:1
eBasis:738496:1
eBasis:654168:1
eBasis:652566:1
eBasis:705210:1Uncaught exception from user code:
Uncaught exception from user code:
Storable binary image v24.8 more recent than I am (v2.6) at
blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al)
line 364.
eval {...} called at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/thaw.al) line 364
Storable::thaw('1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
MLDBM::Serializer::Storable::deserialize('MLDBM::Serializer::Storable=HASH(0x20257444)',
'1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at /usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM.pm line 155
MLDBM::FETCH('MLDBM=HASH(0x200347e4)', 'BSafe') called at
../show_appstaffwk.pl line 39, at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
Carp::croak('Uncaught exception from user code:^J^IStorable
binary image v24.8 ...') called at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/logcroak.al) line 71
Storable::logcroak('Uncaught exception from user
code:^J^IStorable binary image v24.8 ...') called at
blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al)
line 365
Storable::thaw('1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at
/usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM/Serializer/Storable.pm
line 27
MLDBM::Serializer::Storable::deserialize('MLDBM::Serializer::Storable=HASH(0x20257444)',
'1^HM-^A^@^@^@^F813032^HM-^A^@^@^@^F813034^HM-^A^@^@^@^F881080^HM-^A^@^@^@^F740209^HM-^A^@^@^@^F697580^HM-^A^@...')
called at /usr/local/perl-5.6.1/lib/site_perl/5.6.1/MLDBM.pm line 155
MLDBM::FETCH('MLDBM=HASH(0x200347e4)', 'BSafe') called at
../show_appstaffwk.pl line 39
I'm really stuck on this. Could anyone help me out please? Thanks.
JS.