$ myscript.pl < input | tee output