local $/= "# input for "; my $done = 0; while () { s/1\.00/5/g if /Data\b\n/ and !$done++; print; }