in reply to filehandler stored in hash-ref

print {$s->{out}} "test";
Update: I was too slow on posting the print, so here's the read:
# because @in = <$s->{in}> won't work my @in = readline($s->{in});