in reply to Re^2: Adding back missing newlines between records
in thread Adding back missing newlines between records

Its the magick -0777 option that sets input record separator, so instead of reading lines, it reads records of no more than oct(0777) (511) bytes, or if your platform doesn't have record oriented files, it reads the whole file.

Replies are listed 'Best First'.
Re^4: Adding back missing newlines between records
by 7stud (Deacon) on Nov 06, 2009 at 12:20 UTC

    Ah. Sorry, I thought my browser was rendering something wrong when I saw -0777.

    Thanks.

Re^4: Adding back missing newlines between records
by 7stud (Deacon) on Nov 06, 2009 at 12:38 UTC
    The -0 flag is described differently here:

    http://affy.blogspot.com/p5be/ch17.htm

    According to them, the -0 option is not the number of bytes to read. Instead, it's the character(in octal format) that is to be considered the end of a "line". It says 0777 is not a valid character, therefore it is never found in the file and your whole file gets slurped as one line.

    Is that accurate?