=over =item select FILEHANDLE X to temporarily "capture" the output of C like this: { my $old_handle = select $new_handle; # This goes to $new_handle: print "ok 1\n"; ... select $old_handle; } you might find it easier to localize the typeglob instead: { local *STDOUT = $new_handle; print "ok 1\n"; ... } The two are not exactly equivalent, but the latter might be clearer and will restore STDOUT if the wrapped code dies. The difference is that in the former, the original STDOUT can still be accessed by explicitly using it in a C statement (as C), whereas in the latter the meaning of the STDOUT handle itself has temporarily been changed. Portability issues: L. =item select RBITS,WBITS,EBITS,TIMEOUT X