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;

Replies are listed 'Best First'.
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 perusing the Monastery: (4)
As of 2016-09-30 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.