I get a strange text file with only CR as 'end of line', from a source that is unknown to me. I assume it is created by MicroFocus COBOL on Unix server. I am prety sure it does not come from a z/OS mainframe. The records are fixed length and it might be some standard in the originating environment. I do get other fixed length files from that environment but they all have the standard CR/LF or LF.

My question is how could I tell Perl to either view 'CR only' as 'end of line' or break the file to fixed length chunks?

#to allow the program to read normal as well as stupid fixed length 228 + CR characters open (INDEXIN, "$SourceFile") or die("Couldn't open input file: $!"); while (<INDEXIN>) { chop; #if you want to get rid of the CR