in reply to Standard way for displaying a script's output.

I just separate code from output with a __END__ token. I don't see much added value in using different colours or fonts. We aren't writing vegetables in green, verbs in boldface either, do we?

Replies are listed 'Best First'.
Re^2: Standard way for displaying a script's output.
by tobyink (Canon) on Feb 10, 2012 at 22:46 UTC

    A problem with that is that __DATA__ sections are often used to supply sample input for the script, and those can't really be combined in the same file.

Re^2: Standard way for displaying a script's output.
by Xiong (Hermit) on Feb 10, 2012 at 23:05 UTC

    Except that it's legitimate to store data after any __DATA__; even after __END__ in main.

    use strict; use warnings; use SelfLoader; sub daily { sleep int rand }; # work work work print plimsoll() if shift; daily; __END__ sub plimsoll { "http://en.wikipedia.org/wiki/Samuel_Plimsoll\n" };
    I'm not the guy you kill, I'm the guy you buy. —Michael Clayton
      Except that it's legitimate to store data after any __DATA__; even after __END__ in main.
      So what? Don't forget the audience isn't brainless computers, but humans. I believe that most readers of Perlmonks are smarter than the average houseplant, and don't have trouble spotting the difference between a program that tries to be Miss Smartypants by reading data after an __END__ token, and a program that has its output after an __END__.
        Yes, but the point might have been you cannot mix both input and output in this way.