in reply to Opening and Closing STDOUT

You can use a following code:
# Redirect STDOUT to your file open(TMP, ">&STDOUT); open(STDOUT, ">/tmp/out.tmp") or die "Can't open a temporary file: $!" +; # do something, all programm input will be redirected to your tmp # file exept error messages of course. # Restore STDOUT open(STDOUT, ">&TMP"); close(TMP) or die "Can't close temporary file: $!";


{ firstname => 'Michael', quote => 'Mice were crying and stinging but went on nibbling the + cactus', }