Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Perl code to format the text file by inserting tag in blank lineby DAN0207 (Acolyte) |
on Feb 12, 2020 at 05:08 UTC ( [id://11112830]=perlquestion: print w/replies, xml ) | Need Help?? |
DAN0207 has asked for the wisdom of the Perl Monks concerning the following question: I have a input file with contents as below:
I have written the code(pasting here only the specific code,not all lines)as below:
The output file which i get after executing the code is
I can see that there are some blank lines where the combination is not present(Stov1 is present for all meas whereas Stov2 is not present for all.)I am planning to insert a tag like <r></r> in place of blank lines so that further processing of my outputfile is valid. Could you pl. help me to achieve this.TIA
Back to
Seekers of Perl Wisdom
|
|