perl -pi -e 's/^\-{40,40}^M*$/((\*) x 80)/' logfile