my $text = "line 1\0line 2\0line 3"; IO::Handle->format_line_break_characters("\0"); format STDOUT = Text: ^* $text ~~ ^* $text . write;