MLDBM || die; 
Author Message
 MLDBM || die;

For the past month I've been working with MLDBM, writing services for
my IRC network. I've been using hashes to store my data; but I've come
upon a problem...How do I change already initialized values? For
example:

#!/usr/bin/perl

use MLDBM qw(DB_File Storable);

use Fcntl;

 tie( %hash, "MLDBM", "hash.db" ) || die "Could not open or create
db.";

$value = 123;

$hash{$value}->{value} = '123;

## change $hash{$value}{value} to newvalue

$hash{$value}->{value} = 'newvalue'; #doesn't work

$hash{$value} = {

'value' => 'newvalue'

Quote:
}; #doesn't work

$refhash = \$hash{value};

$refhash = {

'value' => 'newvalue'

Quote:
};

$hash{value} = \$refhash; ##doesn't work either

untie(%hash); #just for good measure

I have no clue what to do, and I'm getting frustrated to tears. Please
help me out with this problem.

Thanks,

uneks

setuid0.dagweb.net



Wed, 01 Sep 2004 19:36:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. dies on die......well sorta

2. To die() or Not to die()

3. Die doesn't die in DESTROY in Perl 5.001l

4. $SIG{__DIE__} vs *CORE::GLOBAL::die

5. die does not die ?

6. Open or Die - is die the only choice?

7. Die process, Die!

8. Die won't die! pleez help

9. die socket die!!

10. Die doesn't die in DESTROY in Perl 5.001l

11. byte-order independent MLDBM database

12. MLDBM.pm read error

 

 
Powered by phpBB® Forum Software