in reply to Data Move

Your code never calls your subroutine, so I assume something is missing here. But in general, if you only want to print the lines that are matched by your find-and-replace regex:

if( s/^$rcid\:.*/$rcid\:$car\:$owner/g ){ print $outfile $_; }

Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.

Replies are listed 'Best First'.
Re^2: Data Move
by PilotinControl (Pilgrim) on May 27, 2015 at 15:01 UTC

    I just posted the code that I am having an issue with. The search and replace code works fine...and it deletes the record and moves it to a new file...that part of it works...what the code is doing is also moving ALL data from that file to the updated file no just the updated data.

Re^2: Data Move
by PilotinControl (Pilgrim) on May 27, 2015 at 16:42 UTC

    Aaron B....after moving a few lines of code around I was able to solve the issue...code placement is very key to order and structure. Thanks for your advice.