I need to output the same text to two different files (it is a application requirement, which I am testing). Now, I do not wish to open two file handles, write two lines to each, then close them a dozen times in my code.
Is there a simple way, perhaps using a single line in Perl (but not in the CLI!), to send the same text to two different files?