I'm not completely sure, but I think you should take a look at the Tie::File module. It allows you to treat a file like an array. Then you could just keep reading the first item in the array. Here's what it looks like:
tie @data, Tie::File, $filename or die "Can't tie to $filename :$!\n";
array would then contain the contents of the file, one entry per line. You could then just read $data
, which would be the first line of the file. I think that it would update dynamically.