my $debug = 2; # This is level 3 information if ($debug >= 3) { print DEBUG "LEVEL 3: bar\n"; } # This is level 2 information if ($debug >= 2) { print DEBUG "LEVEL 2: foo\n"; } # This is level 1 information if ($debug >= 1) { print DEBUG "LEVEL 1: moo\n"; }