Help for this page
s/^[ ]*//g; s/[ ]*$//g; ... s/99991231//g; s/Jan 1 1900 12:00:00//g; s/[ ]*\~\t\~[ ]*/~/g;
while ( <IN_FILE> ) { s{ ... ## and unlink() the filename for IN_FILE ## then rename() outfile to infile.