Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Data Move

by aaron_baugher (Curate)
on May 27, 2015 at 13:46 UTC ( [id://1128000]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1128000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-03-28 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found