use constant DEBUGGING => 2; ... print DEBUG "foo\n" if DEBUGGING >=2; ... print DEBUG "moo\n" if DEBUGGING;