CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
DB_File and record structure



Apr 11, 2002, 2:19 PM

Post #1 of 1 (1333 views)
DB_File and record structure Can't Post


want to tie db_file like so..

tie (%h, "DB_File", "/home/db/share/perl/records.db", O_RDWR|O_CREAT, 0644, $DB_HASH) or die "Sorry";

### add a record via hash of hash

$h{me}{boss} = "evilman";

now, when i access the file again and do something like

for my $key (keys %h) {
print "$key\t";
### prints "me"

### now, i want to print "evilman" how do i do it ?

### i can see the reference, but can't seem to dereference it.


thanks in advance for any help or suggestions.. basically, i need to store a key in the file with many attributes. (boss, phone#, address, whatever)



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives