Hi,
thanks for all the suggestions. I originally tried to avoid slurping the whole file
into memory, but got stuck using the $. variable to address a line and the one
following it.
Thanks John and Gunnar for pointing me to the right direction, and thanks to Charles
for his extensive comments.
Jan Eden wrote:
Hi,
Hello again,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched.
Jan Eden <[EMAIL PROTECTED]> wrote:
: I had the following task: Open a file, read it and merge all
: pairs of lines containing a certain number of tabs. Example:
:
: Blablabla
: abc cab bca
: 123 453 756
: Blablabla
: Blablabla
:
: Here, lines 2 and three should be merged, while the other
: line
Jan Eden wrote:
Hi,
Hello,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched. Expec
Jan Eden wrote:
I had the following task: Open a file, read it and merge all pairs
of lines containing a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines
should remain untouched. Expected result:
B
Hi,
I had the following task: Open a file, read it and merge all pairs of lines containing
a certain number of tabs. Example:
Blablabla
abc cab bca
123 453 756
Blablabla
Blablabla
Here, lines 2 and three should be merged, while the other lines should remain
untouched. Expected result:
Blablab