grab_stdout($foo); print 'gabba gabba hey'; ungrab_stdout(); ok($foo eq 'gabba gabba hey`) || diag "didn't print 'gabba gabba hey' to stdout.";