For some tasks it would be cool to redirect STDOUT to a file or to a scalar (with IO::Scalar), but only in certain scope.
Of course local STDOUT dies with Can't modify constant item in local....
Is there a clean solution?
Update: I just found IO::String and select which works for STDOUT, but is there a way for STDERR as well? I don't need it, I'm just curious ;-)
In reply to Redirecting STDOUT, lexically scoped by moritz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |