Here is the "boiled down" source of the entire post.cgi script which is supposed to add the new key. However, sometimes it fails and sometimes it succeeds, seemingly randomly.
I don't know why the script is dying where you show. Use warnings and strict, and errorcheck/die for tie and file opens. Those may help you find the problem. Once you've found the problem, I also strongly advise replacing the CONTENT_LENGTH stuff with CGI.pm. Good luck!
#!/usr/local/bin/perl
use warnings;
use strict;
use DB_File;
my %data;
tie(%data, 'DB_File', "data.db") or die $!;
$data{"1131764522.1131769129"} = "1131764522.1131769129\tJiskha Webmas
+ter\t\tMt Tarawera\t\t70.228.93.58" || die "$!";
untie(%data) or die $!;
%data=();
print "success!\n";
tie(%data, 'DB_File', "data.db") or die $!;
print $data{"1131764522.1131769129"};