#!/usr/bin/perl -w use lib '/path/to/local/lib/'; use File::Tee qw(tee); ################ ## No bug yet ## ################ #Print Starting Info print ("=============================\n"); print (" Just a simple bug example \n"); print ("=============================\n\n"); # Get user input print ("Enter anything: "); $CODE = <>; chomp ($CODE); print ("You used $CODE!\n=============================\n\n"); ################ ## Here it is ## ################ # Start with Tee tee(STDOUT, '>', 'logfile.txt'); #Print Starting Info print ("=============================\n"); print (" Just a simple bug example \n"); print ("=============================\n\n"); # Get user input print ("Enter anything: "); $CODE2 = <>; chomp ($CODE2); print ("You used $CODE2!\n=============================\n\n"); #### ============================= Just a simple bug example ============================= Enter anything: PerlMonks You used PerlMonks! ============================= ============================= Just a simple bug example ============================= TeeTestPM perl/teetest> Enter anything: You used TeeTestPM! =============================