in reply to Output redirection

For example, you could use IO::Handle. Its part of the core. There's an example by perlmonkey here.