in reply to Re^3: Printing text from scrolled window?
in thread Printing text from scrolled window?

Oop, quite right. I missed that part of the original question.

If the OP's trying to post-process the contents line-by-line before printing that's something completely different of course, but I didn't get that from the overall question (and it only would seem that way when you actually read that one un-parenthetical parenthetical aside which I missed).

Otherwise the objection still remains: if you're just trying to print the contents out somewhere, it's unnecessary work to split to lines just to add back newlines.

Update: And even if you are post-processing things from an array I'd tend to use something along the lines of for( @lines ) { my $line = munge($_); print $line, "\n"; } rather than joining for one big print just in the interest of efficiency.

Useless observation: Posting #2000. Break out the crepe paper and confetti.