tie_stdinout is a sample program showing how to tie STDIN and STDOUT
to buffers. After the tie, every print "string" appends to an
internal buffer, while every while(<STDIN>) reads from
the another buffer.
This way we can teach functions/libraries that just know how
to read from STDIN and write to STDOUT how to process strings.