Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: MLDBM::Easy does not update data structure

by Anonymous Monk
on Jun 23, 2009 at 06:42 UTC ( [id://773884]=note: print w/replies, xml ) Need Help??


in reply to MLDBM::Easy does not update data structure

Don't you want to tie MLDBM::Easy
|||||| VVVVVV tie (%hash, 'MLDBM', 'testmldbm',

Replies are listed 'Best First'.
Re^2: MLDBM::Easy does not update data structure
by gctaylor1 (Hermit) on Jun 24, 2009 at 00:15 UTC
    I made the change  tie (%hash, 'MLDBM::Easy', 'testmldbm', O_CREAT|O_RDWR, 0640) or die $!; as suggested but that produced another error.
    Can't use string ("") as a SCALAR ref while "strict refs" in use at bl +ah.pl line 12.
    Line 12 is print ${$hash{value1}}[2], "\n";

    I've tried a few different things but am not sure how to resolve. Is the problem how I'm trying to print it or is it the assignment? If I comment out the print line, the assignment seems to work (no error message).

    What confuses me more, I didn't get this error with tie (%hash, 'MLDBM'

      Did you find the answer to your question? I still get the same error you mentioned above

      Can't use string ("") as a SCALAR ref while "strict refs" in use at

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://773884]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-19 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found