in reply to Cannot find the error
Hello gudmo,
... #my $debug = "true"; print "Let's start\n" if $debug; ...
A better way to do this is with the constant pragma, which plays well with strict and still gives you the benefits of conditional compilation:
#!/usr/bin/perl use strict; use warnings; use constant DEBUG => 0; ... print "Let's start\n" if DEBUG; ...
Update: Fixed typo: missing constant in the definition of DEBUG (!) Thanks, pryrt.
Hope that’s of interest,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|