in reply to Redirecting Standard Output inside perl

See open and select.

And I'm on Windows 10 (Unfortunately)

In which case the above for select might well not apply. As a non-windowser I'll leave others to suggest a solution (or even explain why it isn't an issue for you).

Addendum: see also the Q&A entry how do i redirect STDOUT, STDIN, or STDERR to a FILE?

  • Comment on Re: Redirecting Standard Output inside perl

Replies are listed 'Best First'.
Re^2: Redirecting Standard Output inside perl
by haukex (Archbishop) on Nov 09, 2017 at 17:50 UTC
    And I'm on Windows 10 (Unfortunately) ... In which case the above for select might well not apply.

    If you are referring to the single-arg select, I don't think you have to worry, perlport says (emphasis mine):

    (Win32, VMS) Only implemented on sockets.

    (RISC OS) Only reliable on sockets.

    Note that the "select FILEHANDLE" form is generally portable.