in reply to Re: Add Space after $Find
in thread Add Space after $Find

That was the problem! Thank you. Removed the $find and just put the simple text I was searching for. Correction below.

use strict; open (NEW, ">", "FILE_OUTPUT.txt" ) or die "could not open:$!"; open (FILE, "<", "UBTEST.txt") or die "could not open:$!"; while (<FILE>) { print NEW $_; if (/END OF EXPANDED DATA 5010/){ print NEW "\n"; } } close (FILE); close (NEW);