Hi,
I have a simple script that reads a hashDB file into a tied hash.
When I do a Dumper , I get the hash values , but when I pring a value nothing is printed ... what am I doing wrong here ?
-------------------------------------------- use DB_File; use strict; use Data::Dumper;
my %hash; my $DATAFILE = "sample.db"; tie %hash, 'DB_File', $DATAFILE, O_RDONLY , 0666 , $DB_HASH; print Dumper([\%hash]); print "VALUE for a is '" . $hash{a}."' \n";
---------------------------------------------------------
OUTPUT ------------------------------------------------------- $VAR1 = [ { 'b' => '2', 'a' => '1', 'c' => '3' } ]; VALUE for a is '' ---------------------------------------------------------
Thanks Ram
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>