Give the code data file content of the data records, I'm unable to print the first line of each record. However, it does print the first line of the record as in:
Note: I'm sure there are many ways to do this using the split function, but in my case, I need a solution that follows the code question....
I think the problem is that after chomp the input record separator of __Data__, the first record gets process correctly but the first line of the other records is a blank line, and therefor, the output shows a blink line as the first line. I try using a input record separator of __Data__\n and did not chomp
Data file content of records
open my $fh,"<","logA.txt" or die "Unable to open file";
# remove the input record separator value of __Data__
# display the line of each record