in reply to printing to a file
$ myscript.pl < inout > output [download]
$ myscript.pl < input | tee output [download]