Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 pondering the Monastery: (7)
As of 2014-12-21 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls