Index: /trunk/api/perl/t/100_flush_bug.t
===================================================================
--- /trunk/api/perl/t/100_flush_bug.t (revision 813)
+++ /trunk/api/perl/t/100_flush_bug.t (revision 814)
@@ -6,5 +6,6 @@
 use IO::Socket::INET;
 
-my $testaddr = "127.0.0.1:11311";
+my $port = 11311;
+my $testaddr = "127.0.0.1:$port";
 my $sock = IO::Socket::INET->new(
     LocalAddr => $testaddr,
@@ -31,13 +32,13 @@
 close $sock;
 
-
 my $pid = fork;
 die "Cannot fork because: '$!'" unless defined $pid;
 unless ($pid) {
+    
     my $sock = IO::Socket::INET->new(
-        LocalAddr => $testaddr,
-        Proto     => 'tcp',
-        ReusAddr  => 1,
-        Listen    => 1,
+        LocalAddr  => $testaddr,
+        Proto      => 'tcp',
+        ReuseAddr  => 1,
+        Listen     => 1,
     ) or die "cannot open $testaddr: $!";
     my $csock = $sock->accept();
@@ -51,4 +52,7 @@
 }
 
+# give the forked server a chance to startup
+sleep 1;
+
 my $memd = Cache::Memcached->new({ servers   => [ $testaddr ] });
 
Index: /trunk/api/perl/ChangeLog
===================================================================
--- /trunk/api/perl/ChangeLog (revision 811)
+++ /trunk/api/perl/ChangeLog (revision 814)
@@ -1,2 +1,4 @@
+	* Fix occasional failure in the 100_flush_bug.t test (Ask BjÃžrn Hansen)
+
 2009-05-04: version 1.26
 
