I'm trying to read a file which has only CR as line delimiter. I'm using Mac OS X and Perl v.5.8.8. This script should run on every platform, for every kind of line delimiter (CR, LF, CRLF).
My current code is the following :
open(FILE, "test.txt");
while($record = <FILE>){
print $record;
}
close(TEST);
This currently print only the last line (or worst). What is going on? Obvisously, I would like to not convert the file. Is it possible?