Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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
Re^2: open a gdbm file
by lakssreedhar (Acolyte) on Oct 27, 2012 at 07:25 UTC
    @Khen1950fx

    i could read the file thanks for the code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-05 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls