Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

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 having an uproarious good time at the Monastery: (9)
As of 2015-10-13 09:39 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (299 votes), past polls