in reply to Re: search and replace on a line by line basis
in thread search and replace on a line by line basis

Using negative lookahead for the 00000000 case tightens it up:
perl -lne 'print if s/(?<=^.{188})(?!0{8})(\d{8})(?=.{16})/20020101/' +original.txt > new.txt

The PerlMonk tr/// Advocate