in reply to Perl to add a table once and then when run again delete the original table (but not the whole html document)!

You are opening the file for append in:
open(DAT,">>$sitedata") || die("Cannot Open File");
Try openning it for write, which will erase the previous data:
open(DAT,'>', $sitedata) || die("Cannot Open $sitedata: $!");
  • Comment on Re: Perl to add a table once and then when run again delete the original table (but not the whole html document)!
  • Select or Download Code