Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi all. i'm a noob to perl and using perl in the library world. At the moment I am working on a file to change a xml file to a flat file. The current script work great however I need some assistance with two lines.
1) Remove line - Not sure if tiredness is catching me but I have this one line that does not want to disappear. The full line is: .024. 3# (two white spaces at the end) I need to remove the whole line.
2) Replace first 5 characters if line end with certain characters - These lines are the ISBN fields for the records and looks like: .024. 3#|a9780750247092|xisbn13 .024. 3#|a0750247096|xisbn If the line ens with |xisbn13 or |xisbn I need to replace the first characters (.024.) with .020.
My current script is very long and consists of general substitutes. I thank you in advance!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove line and modify another
by hippo (Archbishop) on Sep 05, 2018 at 22:57 UTC | |
|
Re: Remove line and modify another
by Marshall (Canon) on Sep 05, 2018 at 20:47 UTC | |
|
Re: Remove line and modify another
by AnomalousMonk (Archbishop) on Sep 05, 2018 at 23:30 UTC | |
|
Re: Remove line and modify another
by IceJ (Initiate) on Sep 06, 2018 at 05:48 UTC | |
by poj (Abbot) on Sep 06, 2018 at 07:17 UTC |