Hi, Can somebody please help me to get this code fixed? Since I've moved the DB_File "tie" and "untie" functions to sub's, data is never written to the database. I've tried both call-by-refeence and call-by-value methods without any luck.
use strict; use DB_File; sub openDB { my %db; tie(%db,'DB_File',"db",O_CREAT|O_RDWR,0666); return \%db; } sub closeDB { # my $parm = shift; my ($parm) = @_; my %db = %$parm; untie(%db); } # Write data to DB... my $z1 = openDB; my %x1 = %$z1; $x1{'A'} = "B"; # PROBLEM IS THIS DATA WILL NEVER BE WRITTEN TO THE DB $x1{'B'} = "C"; $x1{'C'} = "D"; print "A = $x1{'A'}\n"; closeDB(\%x1); # Read data back... my $z2 = openDB; my %x2 = %$z2; print "A = $x2{'A'}\n"; closeDB(\%x2); # EOF Best regards. Frank Naude -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]