srprabu has asked for the wisdom of the Perl Monks concerning the following question:
I am new to perl, i am in need of a search and replace to be happen between two files, ie., search has to be happen in a file let it be, a.txt and replace to be happened in another file b.txt
For Example
In a.txt, file structure will be as follows <author> <afiil> etc...
In b.txt, file structure will be as follows <author>This is the sample author </author><afiil> This is the sample affiliation</afiil>
Now my replace should be happen like, perl has find the <author> from a.txt and that has to replace in a newline in b.txt same way <afiil> has to be replaced.
and one more question, please
i want to delete text between the tag <! ... > Similarly between &! ... ; How can i check the open tag and close tag, there may be many closing tag similarly semicolon will come in the between the open tag(<! or &!) and close tag (> or ;).Regards,
srprabu
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search and Replace for XML
by Narveson (Chaplain) on Apr 28, 2008 at 13:36 UTC | |
by srprabu (Initiate) on Apr 29, 2008 at 04:10 UTC | |
by GrandFather (Saint) on Apr 29, 2008 at 04:37 UTC | |
by srprabu (Initiate) on Apr 29, 2008 at 04:28 UTC | |
|
Re: Search and Replace for XML
by Utilitarian (Vicar) on Apr 28, 2008 at 12:19 UTC | |
by GrandFather (Saint) on Apr 28, 2008 at 21:50 UTC | |
by srprabu (Initiate) on Apr 29, 2008 at 04:23 UTC |