Help for this page

Select Code to Download


  1. or download this
    *DEBUG = \1;
    use constant CONST_DEBUG => 1;
    $DEBUG && print "foo\n";
    CONST_DEBUG && print "bar\n";
    
  2. or download this
    ## Output of perl -MO=Deparse on my machine with perl 5.6.1:
    *DEBUG=\(1);
    ...
    }
    print "foo\n" if $DEBUG; # <- $DEBUG must be evaluated each time
    print "bar\n"; # <- there's no evaluation... just straight print()'ing