in reply to filehandler stored in hash-ref
print { $s->{out} } "test"; [download]
That's mentioned at the end of the print documentation.