... DEBUG and print 'debugging'; ... #### C:\test>perl -le"use constant DEBUG=>0; print 'hi'; DEBUG and print 'debugging'; print 'bye'" hi bye C:\test>perl -MO=Deparse -le"use constant DEBUG=>0; print 'hi'; DEBUG and print 'debugging'; print 'bye'" BEGIN { $/ = "\n"; $\ = "\n"; } use constant ('DEBUG', 0); print 'hi'; '???'; print 'bye'; -e syntax OK #### #! perl -slw use constant DEBUG => $DEBUG; use strict; print 'hi'; DEBUG and print 'debugging'; print 'bye'; __END__ C:\test>t-debug.pl hi bye C:\test>t-debug.pl -DEBUG hi debugging bye C:\test>perl -MO=Deparse t-debug.pl BEGIN { $^W = 1; } BEGIN { $/ = "\n"; $\ = "\n"; } use constant ('DEBUG', $DEBUG); use strict 'refs'; print 'hi'; '???'; print 'bye'; C:\test>perl -MO=Deparse t-debug.pl -DEBUG BEGIN { $^W = 1; } BEGIN { $/ = "\n"; $\ = "\n"; } use constant ('DEBUG', $DEBUG); use strict 'refs'; print 'hi'; print 'debugging'; print 'bye';