in reply to A string that begins whit $

# Why are you doing system("echo $gpsdata") anyway? It's expensive. Try print $gpsdata, or, if you need the extra newline, print "$gpsdata\n".