Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Edit a New file in place after reading it in

by GotToBTru (Prior)
on Dec 21, 2021 at 23:20 UTC ( [id://11139812]=note: print w/replies, xml ) Need Help??


in reply to Edit a New file in place after reading it in

Help us help you with a Short, Self-Contained, Correct Example

Lines 44 - 63 of your sample code would have been sufficient, if I am understanding your question correctly.

my %substitutions = ( 'Xi Wong' => 'Lucca P.', 'MG5237ALL5X' => 'MG54 +15DP', 'SI' => 'SA' ); while (my $line = <$base_fh>) { foreach my $was (keys %substitutions) { $line =~ s/$was/$substitutions{$was}/g; } print $New_fh $line; }
But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 03:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found