in reply to Re: Replacing Text At Specific Positions
in thread Replacing Text At Specific Positions

Or if you're trying to preserve all the lines starting with the line starting with "2", then:
my $found_2; while (<INFILE>) { my $line = $_; if ( !$found_2 ) { if ( $line ~= m/^2/ ) { $found_2 = 1; } else { substr($line, 99, 1, "9"); substr($line, 148, 1, "Z"); } } print OUTPUT $line; }