Yes, this is possible - see "Network Links" in the KML Tutorial and the rest of the KML docs. Here is a really simple proof-of-concept, open the generated main.kml and you should see the point hopping around the map while the script runs. This script is far from optimal, for example you should use a proper templating engine (e.g. Template) or XML::LibXML to generate the XML instead of the way I'm doing it here (regexes). You can control and adjust a lot of things in Google Earth using KML, it's too much to cover here, so see their documentation. I'm using my module File::Replace to help prevent Earth from reading the XML file while the script is writing it.
use warnings;
use 5.014; # for s///r
use File::Replace qw/replace3/;
use utf8;
my $mainkml = 'main.kml';
my $dynkml = 'dyn.kml';
open my $fh1, '>:encoding(UTF-8)', $mainkml or die "$mainkml: $!";
print $fh1 <<'END_KML1' =~ s/__FILENAME__/$dynkml/r;
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Folder>
<name>Network Links</name>
<visibility>0</visibility>
<open>0</open>
<NetworkLink>
<name>Random Placemark</name>
<refreshVisibility>0</refreshVisibility>
<visibility>1</visibility>
<open>1</open>
<flyToView>1</flyToView>
<Link>
<refreshInterval>2</refreshInterval>
<refreshMode>onInterval</refreshMode>
<href>__FILENAME__</href>
</Link>
</NetworkLink>
</Folder>
</kml>
END_KML1
close $fh1;
print "Please open '$mainkml' in Google Earth\n";
my $run = 1;
$SIG{INT} = sub { $run=0 };
my ($lat,$lon) = (52.514509,13.350103);
while ($run) {
my (undef,$outfh,$repl) = replace3($dynkml, ':encoding(UTF-8)');
print $outfh <<'END_KML2' =~ s/__LONLAT__/sprintf('%.6f,%.6f',$lon
+,$lat)/er;
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Placemark>
<name>Random Placemark</name>
<description>Hello, World!</description>
<Point>
<coordinates>__LONLAT__</coordinates>
</Point>
</Placemark>
</kml>
END_KML2
$repl->finish;
sleep 1;
$lat += (rand(2)-1)/1000;
$lon += (rand(2)-1)/1000;
}