open(TPOOL, "|thread_pool.test) || print "error: $!" && exit(1)); while(1) { sleep 10; print TPOOL "This is just a test\n"; } Reader: file name: thread_pool.test while(1) { my $input = ; log("input: $input"); }