in reply to different length of a line from linux and windows textfile?
That is a byte oriented thing and not a character oriented thing.
There are many complications that can arise between bytes and characters.
The translations between "\n" or "\r" or "\r\n" in different O/S'es are well known, but "messy".
Show some example input and what you want to do.open(FILE, "<", "textfile.txt") or die "Cannot open textfile: $!"; while (<FILE>) { print; #just to get started... # something.. } # using a seek() is almost never "right".
|
|---|