in reply to else statement

You're still missing a semicolon...
if ( my $child >= 0 ) { kill $child; } else { close LOGFILE; undef $CONN; }