# Uncomment to enable writing debuging info to logfile my $debug = 1; # Open a debug logfile if ($debug) { my $logfile = "movelog.debug.log"; open(DEBUG, ">>$logfile"); print DEBUG localtime().": Startup.\n"; } if ($debug) { print DEBUG locasltime." : This is some example line...\n"; } #### my $debug = 2; # This is level 2 information if (something) { print DEBUG "LEVEL 2: foo\n"; } # This is level 1 information if (something) { print DEBUG "LEVEL 1: moo\n": }