razmeth has asked for the wisdom of the Perl Monks concerning the following question:
I'm using Windows for this scripting, and I'd like to perform something which seems to be less simple than I'd expect.
I want to use a standard print command, and have the ouput printed to the screen as well as to a file. I do not need to modify STDERR, though that would be an added benefit, and I don't want to print to a specific function which then prints to multiple locations. Is this simpler than my time spent searching has implied?
Desired code:
<Some way to split the output>
print "Hello World!"
Desired output on screen:
Hello World!
Desired output in text file:
Hello World!
I want to use a standard print command, and have the ouput printed to the screen as well as to a file. I do not need to modify STDERR, though that would be an added benefit, and I don't want to print to a specific function which then prints to multiple locations. Is this simpler than my time spent searching has implied?
Desired code:
<Some way to split the output>
print "Hello World!"
Desired output on screen:
Hello World!
Desired output in text file:
Hello World!
Back to
Seekers of Perl Wisdom