in reply to redirecting output from a format

You can't use IO::Scalar, but you can use PerlIO::scalar in 5.8.x:
format FOO= @||| @||| @||| $x,$y,$z . $x=1;$y=2;$z=3; $save = ""; open FOO, ">", \$save; write FOO; print "got:$save!\n";
Reopening STDOUT is a little more complicated, but easily doable.