Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: open a gdbm file

by Khen1950fx (Canon)
on Oct 27, 2012 at 06:44 UTC ( #1001168=note: print w/ replies, xml ) Need Help??

in reply to open a gdbm file

I think that you were thinking of something like this:

#!/usr/bin/perl BEGIN { $| = 1; $^W = 1; } use strict; use autodie; use warnings; use GDBM_File; my (%hash, $key, $val); my $filename = "/home/DESKTOP/dict_final"; tie %hash, 'GDBM_File', $filename, &GDBM_READER, 0640; while (($key, $val) = each %hash) { print "$key::$val\n"; } untie %hash;

Comment on Re: open a gdbm file
Download Code
Replies are listed 'Best First'.
Re^2: open a gdbm file
by lakssreedhar (Acolyte) on Oct 27, 2012 at 07:25 UTC

    i could read the file thanks for the code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2015-11-29 07:29 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (748 votes), past polls