- or download this
use constant MAX_VERBOSITY => 5;
...
vprint3("msg3"); # Optimized away if arg is < 3
vprint4("msg4"); # Optimized away if arg is < 4
vprint5("msg5"); # Optimized away if arg is < 5
- or download this
use constant MAX_VERBOSITY => 5;
...
vprint("msg3") if V3; # Optimized away if arg is < 3
vprint("msg4") if V4; # Optimized away if arg is < 4
vprint("msg5") if V5; # Optimized away if arg is < 5
- or download this
>perl -MO=Terse 645574.pl 3
LISTOP (0x1986d80) leave [1]
...
msg1
msg2
msg3