in reply to NDBM_File won't store data
How are you checking the values in the database ?use NDBM_File; use Fcntl; tie (%mtime, "NDBM_File",'mtime',O_RDWR|O_CREAT|O_EXCL, 0640) or die " +error : $!"; # dump the data for (sort keys %mtime){ print "$_ $mtime{$_}\n"; } # add a new key $date= MakeDate(); $now = scalar localtime; $mtime{$now} = $date; untie %mtime; sub MakeDate { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localti +me(time); $year = ($year + 1900) ; $mon++ ; my $date = sprintf("%04D%02d%02d", $year, $mon, $mday); return $date; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: NDBM_File won't store data
by HamNRye (Monk) on Aug 28, 2003 at 21:27 UTC | |
by poj (Abbot) on Aug 29, 2003 at 18:20 UTC | |
by HamNRye (Monk) on Aug 29, 2003 at 21:52 UTC |