Thread use if: ? (9 answers)
Opened by vayu at 2007-02-14 13:17

vayu
 2007-02-14 13:40
#74321 #74321
User since
2005-01-13
782 Artikel
BenutzerIn
[default_avatar]
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

my $debug;

BEGIN {
$debug = 0;
}

use if $debug, "Data::Dumper";

my $var = "Hallo";

if($debug) {
no warnings;
print Dumper \$var;
} else {
print $var;
}


wenn ich das no warnings hier nicht setze schmeisst mir perl ne warning,
Dumper used only once ...

View full thread use if: ?