First things first, STDOUT isn't a command, it's a pointer to an output stream. In perl these pointers are referred to as "filehandles". STDOUT is a special filehandle, in that it refers to the "standard output" stream. This is usually the screen.<br><br>Although it's possible to redirect STDOUT, I tend to leave STDOUT alone and create my own filehandle if I need ot redirect output. For example, the following code prints a message to the file "message.out", overwriting it if it already exists.<br><FONT FACE=monospace><br>open (MYSTDOUT, ">message.out"

;<br>print MYSTDOUT "My test message.\n";<br>close (MYSTDOUT);<br></font><br>The disadvantage with this approach is that you do not see the message on the screen. If you want to write a message to the screen and see it in the log file you could try the following:<br><FONT FACE=monospace><br>open (MYSTDOUT, "¦tee message.out"

;<br>print MYSTDOUT "My test message.\n";<br>close (MYSTDOUT);<br></font><br>This opens a pipe to the Unix command "tee". "tee" will print the output to screen as well as sending it to the named file.<br><br>If you want to put the output from your script into a variable, why not turn this on it's head a little? Put the message into a variable, and print the variable? For example:<br><FONT FACE=monospace><br>$My_Message = "My test message\n";<br>open (MYSTDOUT, ">message.out"

;<br>print MYSTDOUT $My_Message;<br>close (MYSTDOUT);<br></font><br><br>Hope this helps.