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

Re^2: Retriving BerkeleyDB Data

by hawk2379 (Novice)
on Aug 02, 2014 at 02:40 UTC ( #1095991=note: print w/replies, xml ) Need Help??


in reply to Re: Retriving BerkeleyDB Data
in thread Retriving BerkeleyDB Data

I was able to write up a rough script based on your recommendations. And it works!
#!/usr/bin/perl use BerkeleyDB; print "start\n"; my $filename = '/home/user/Perl/AA'; #unlink $filename ; my %h ; my $dbh = tie %h, 'BerkeleyDB::Btree', -Filename => $filename, -Flags => DB_CREATE or die "Cannot open $filename $! $BerkeleyDB::Error" ; foreach $key (keys %h) { my ($open, $high, $low, $close, $volume, $interest) = unpack "dddddl", $h{$key}; print "$key: $open,$high,$low,$close,$volume,$interest\n"; # print "$h{$key}\n"; } untie %h; print "end\n";
Thank You for your help.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2021-01-22 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?