Everytime this line is executed, $mmResource{$mmKey} = join('|', ($timeframe, $currentDay, $startTime, $endTime, $mmRec)); the size of my DB_FILE is not increasing unless I do an untie, is there a way to make it write out to the flat file right away without having to untie it?. . tieFile(); . . LOOP: until($pktype eq 'EOJ') { . . while($agntsock->recv($pkstr, $MAXLEN)) { . . my $oldfilehdl = select(%mmResource); $| = 1; $mmResource{$mmKey} = join('|', ($timeframe, $currentDay, $startTi +me, $endTime, $mmRec)); select($oldfilehdl); . . } . . } sub tieFile { my $sr = 'tieFile'; my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( +time); my $resource = sprintf("ResourceMM_%02d%02d%02d%02d.dbm", $mday, $ho +ur, $min, $sec); tie %mmResource, "DB_File", $resource, O_RDWR|O_CREAT, 0640, $DB_HAS +H or die "Cannot open file $resource: $!\n"; $beslog->pnl($sr, 4, "tie file, $resource\n"); }
In reply to size of .dbm file of hash table not growing by jhgrizz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |