in reply to How do I redirect STDOUT to a string?

You could use backticks, too.
my $stdout=`ls`;
or, perl will fill an array of stdou't lines:
my @stdout=`ls -al`;
-vlad