in reply to Re^6: STDERR Restore after redirect (updated)
in thread STDERR Restore after redirect
Always use my; never use local.
Personally, I always choose lexicals over package-global variables if I have a choice. But if you're working with STDOUT and STDERR, then that's what you've got to work with, and local is the right tool. (And don't blame the poor, innocent SEND: { ... } block if you've got code somewhere that's stepping on your global file handles. :)
Give a man a fish: <%-{-{-{-<
|
|---|