in reply to help with Tie::Handle

Mmm, you probably don't need to dup the filehandle - just untie it and print $output as normally.

Makeshifts last the longest.