Because it's a fixed-width file, with no line terminators. This will work however (as a filter):
local $/ = \5201;
while (<>) {
chop;
print;
}
'man perlvar' for details. | [reply] [d/l] |
He would not want to use a simple "while (<ORIGINAL>) {" because newline is different for EBCDIC. It's 0x15 instesd of 0x0A, so the lines don't come out right. (One could always set $/, the input record separator, but if the records are fixed length the choice between setting $/ and using a fixed length read would be a matter of clarity and/or taste. IMO.) | [reply] |