Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Better Way of Storing Data in a Text File?

by Three (Pilgrim)
on Dec 31, 2002 at 14:11 UTC ( [id://223313]=note: print w/replies, xml ) Need Help??


in reply to Better Way of Storing Data in a Text File?

I like to use DB_File for simple database use. It uses berkley db and ties it to a hash. Here is a quick example.
#Get package by ppm install db_file use DB_File; #Decalare varable my %hash; #Tie db to hash tie(%hash, "DB_File", "my.db"); #Add record $hash{'1'} = "hello"; #Check for existance if(exists($hash{'1'})) { #Remove record delete $hash{'1'}; } #Untie from db untie %hash;
Hope this helps.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-03-29 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found