The problem is likely to be that the output to your file is buffered, and you aren't waiting long enough for the buffer to be filled and flushed to the file. Enabling autoflush will fix this for you, and there are a few other issues with your code. This refactoring should do what you want.
use strict;
use warnings;
use Net::Ping;
use Time::HiRes;
my $host = '10.112.114.11';
STDOUT->autoflush;
open my $log, '>', "Ping_$host.txt" or die "Cannot create log file: $!";
$log->autoflush;
my $p = Net::Ping->new;
$p->hires;
while () {
my ($ret, $duration, $ip) = $p->ping($host);
my $event = sprintf "%s\t%s is alive (packet RTT: %.3fms)\n",
scalar localtime, $host, $duration;
print STDOUT $event;
print $log $event;
}