Think about Loose Coupling | |
PerlMonks |
Perl Newline Helpby vivek.vivek (Initiate) |
on Nov 11, 2014 at 17:31 UTC ( [id://1106853]=perlquestion: print w/replies, xml ) | Need Help?? |
vivek.vivek has asked for the wisdom of the Perl Monks concerning the following question:
I have the below file which I pass to a perl code. Usually the format is that 6th Field of the line starting with FILE is a number. But in some cases, the number falls to the next line. The number is important to me. I need to bring the number by replacing "\" to the line starting with FILE. I tried chomp and all. But didnot work.
FILE TEXT VAL 9999.999 08-jul-2014 \ 270 3E4497B6B8482ADED734 HDNDFLHWLEJHFL LKSNFLKN \ WKENFLWHFELHN UIEKEFJBKJFN
FILE TEXT2 VAL 9999.999 16-may-2014 60 \ 8EC4B7367989D54F6D6C HSHFGFLALKHF KJAHEFKHAH\ YRNBFLJNELFN LQJFLKJWEF LKJFLKWJF Below is the latest code I tried.
Output I need is FILE TEXT VAL 9999.999 08-jul-2014 270 3E4497B6B8482ADED734 HDNDFLHWLEJHFL LKSNFLKN \ WKENFLWHFELHN UIEKEFJBKJFN
FILE TEXT2 VAL 9999.999 16-may-2014 60 \ 8EC4B7367989D54F6D6C HSHFGFLALKHF KJAHEFKHAH\ YRNBFLJNELFN LQJFLKJWEF LKJFLKWJF
Back to
Seekers of Perl Wisdom
|
|