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