Dear Monks,
I am experiencing the strangest possible issue and have no ideas left anymore. Any help is appreciated. I am essentially reading 3 types of text files from a directory, parsing them using Text::CSV and then writing them to an Excel file using Excel::Writer. All was working well. Then I decided to copy on of the text files (p220-816867-052_avl.txt) to the same directory under a different name (p220-816867-053_avl.txt).
The code reads each file in sequence. Now what is happening is that after processing the original files with success, when the code comes to process p220-816867-053_avl.txt, the
(while my $line = <FILE>)
is reading the whole file in one line and this skipping all newlines in the file. I spent hours trying to figure out but to no avail. I checked and the file p220-816867-053_avl.txt does have 80 lines. It is the same file as the original that I copied from. But the
while command is reading the whole file in one line?
Any ideas and thanks in advance