in reply to Add Space after $Find

Your code doesn't compile.
Global symbol "$find" requires explicit package name at ./1.pl line 4. syntax error at ./1.pl line 4, near "$find =" Global symbol "$find" requires explicit package name at ./1.pl line 10 +. Execution of ./1.pl aborted due to compilation errors.

After fixing the problems (and indentation and whatever else is wrong), also add

print NEW $_;

to copy the contents of FILE into NEW.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Add Space after $Find
by Anonymous Monk on Jul 05, 2017 at 20:32 UTC

    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);