At 14.07 +0200 01-05-16, Bart Lateur wrote:
>This person obviously expects a pipe effect, i.e. capturing of the
>"printed" output.
>
>Should Perl6 provide one? Is print() really easier to grasp, than
>'return $buffer', with possibly lots of '$buffer.=$append' in the sub?
>Actually, yes, the latter is annoying.

I have no problem with a lot of $buffer .= "whatever", but this would 
be very handy when you write a long subroutine with a lot of prints, 
and then later decide you'd like to do something else with that 
output.

Depending on whatever Larry is doing with iterators and file handles, 
it could be done by temporarily assigning $STDOUT to your own output 
handle, which stores whatever you print to it in a string, and then 
returning that string.

Cajo.
-- 
Carl Johan Berglund, [EMAIL PROTECTED], 0708-136 236
Adverb Information, http://www.adverb.se, 08-555 788 80

Reply via email to