I have a data file in which some of the time the information is split into multiple lines like this:
My question is how can I either 1) combine the multiple lines in advance or 2)join on the fly while reading the files in line by line?somedata data blah \ continuation of previous line \ another continuation of previous line \ stand alone line stand alone line multiple line \ continuation of multiple line
Thanks for any suggestions.while(<F>) { if (multiple line) { #somehow look ahead and collapese } else { #its a single line so just process } }
In reply to Question on parsing a text file. by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |