use constant DEBUG => 1; ... ... warn "Foo" if DEBUG;