I'm trying to figure out the best way to replace the last line in a script every time the script is run. I know I can rewrite the file with the new last line each time, but I would like a more elegant way. Any suggestions?
Thanks!
#!/usr/bin/perl -w
use strict;
# do stuff
__DATA__
record to replace