while () { $_.=s/<--date\/\/>/$date/; $_.=s/<--loc\/\/>/$location/; $data .= $_ }