in reply to Collect prints to a string

You mean something like:

sub print_1 { my $text = shift; return <<EOT; <p> $text </p> <form> form stuff </form> EOT }
???


Be Appropriate && Follow Your Curiosity

Replies are listed 'Best First'.
Re^2: Collect prints to a string
by vit (Friar) on Apr 23, 2011 at 17:46 UTC
    "return" will need to modify subs which I do not want to do.
    Probably I do not even need to write return because a default return will work, like $string .= print_1($text); ?