Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Replace string in one file using input from another file

by Anonymous Monk
on Feb 07, 2018 at 18:24 UTC ( #1208645=note: print w/replies, xml ) Need Help??


in reply to Replace string in one file using input from another file

The master-file is XML and therefore should be manipulated using XML tools, not direct manipulation as though it were a text-file. You can afford to read the entire file into memory using a tool like XML::LibXML and then manipulate the structure internally. Then, write out the modified XML, preferably into a new file so that the original input is not corrupted when if you make a mistake.
  • Comment on Re: Replace string in one file using input from another file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2018-08-17 03:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (174 votes). Check out past polls.

    Notices?