in reply to newbie-probelm opening file

what does it say after "Can't open history file: " and before it says "line 7"? That's what should tell you - or us.

Update:
Yes, if the file exists and the permissions are as you said, that should work indeed.

Update 2:
perldoc -f dbmopen   suggests this code:

while (($key,$val) = each %TEST) { print $key, ' = ', unpack('L',$val), "\n"; }

Replies are listed 'Best First'.
Re^2: newbie-probelm opening file
by talk2kvj (Novice) on Jun 03, 2004 at 21:53 UTC
    it simply says "can't open history file: at test.pl line 7". no more error messages or anything. i'm a newbie, just trying to open and print the contents of the file. i set the file permission for the history.db as 0700. so accessing it shouldnt be a problem..right?? tia have one more doubt, if i wanna print the value along with key, can i use
    dbmopen(%TEST, "/home/lab/history.db", 0666) or die "Can't open histor +y file: $!"; while (($key,$value) = each %TEST){ print "$key.$value\n";