From: Christian Seifert Date: 2006-08-06T07:00:13+09:00 Subject: How to redirect a string to stdin within code? Hello all, I am trying to create a unit test for a class that reads input from stdin (ie. the user enters his name when starting the class). I would like to write a unit test that provides the input via a string. something like: input = "myname" $stdin = input start my class that I would like to test Any help is greatly appreciated. Christian