while (<>) { if (/^(\w{188})(\d{8})(\w{16})/) { next if $2 eq "00000000"; print "${1}20020101$3\n"; } }