I want to process a file in such a way that, read from multiple lines and make a new file which will have a single line corresponding to this.
For eg.: Input File:
12345 1 - - -
12346 - 2 - 4
12347 - - 3 -
12348 5 - - -
12349 - 6 - 8
12350 - - 7 -
Output file :
12346 1 2 3 4
12349 5 6 7 8
Take 3 lines to make a complete row.
How to do this in perl?