Does perl allow you to conditionally include a module?
For example:
#!/usr/bin/perl -w
use strict;
my $DEBUG = 0;
if (DEBUG) {
use diagnostics;
}
my $filename = "test$$.txt";
open (FH , ">$filename") || die "error: $!";
print (FH "hi");
close (FH);
Although this is a simple and silly example, it would be nice to be
able to include the diagnostic module by setting my debug to true.
Any Comments?
DA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>