in reply to search and replace on a line by line basis

I'm sure one of the other monks can make this into a one-liner, but let me propose a simple program:
while (<>) { if (/^(\w{188})(\d{8})(\w{16})/) { next if $2 eq "00000000"; print "${1}20020101$3\n"; } }
Call it as script original.txt >new.txt