# one way to replace nulls with newlines: $/ = "\x00"; while (<>) { s/\x00/\n/; print; }