in reply to Redirecting STDOUT to a variable


Have a look at the IO::Scalar module which is part of the IO::Stringy distribution:
#!/usr/bin/perl -w use strict; use IO::Scalar; my $str; tie *STDOUT, 'IO::Scalar', \$str; print "hello, world"; untie *STDOUT; print "The data is here: ",$str;

--
John.