lakssreedhar has asked for the wisdom of the Perl Monks concerning the following question:
I want to open a gdbm file.I tried the below code but cant open file error message is displayed
#!/usr/bin/perl -w use strict; use DB_File; my (%HASH, $key, $val); my $filename = "/home/DESKTOP/dict_final"; tie %HASH, 'DB_File', $filename, O_RDWR, 0666, $DB_HASH or die "Can't +open $filename: $!\n"; while (($key, $val) = each %HASH) { print "$key::$val\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open a gdbm file
by Athanasius (Archbishop) on Oct 27, 2012 at 06:25 UTC | |
|
Re: open a gdbm file
by Khen1950fx (Canon) on Oct 27, 2012 at 06:44 UTC | |
by lakssreedhar (Acolyte) on Oct 27, 2012 at 07:25 UTC |