Thread Kommas: Loeschen (50 answers)
Opened by format_c at 2004-06-11 16:54

Taulmarill
 2004-06-17 15:34
#83284 #83284
User since
2004-02-19
1750 Artikel
BenutzerIn

user image
mienst du deine drei codezeilen? die liefern bei jedem eingabewert den selben output :D
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use strict;
use warnings;

for my $a (0,1) {
for my $b (0,1) {
for my $c (0,1) {
print "a=$a, b=$b, c=$c\n";
print "true1\n" if ($a and $b) or $c;
print "true2\n" if ($a and $b) || $c;
print "true3\n" if $a and $b or $c;
}
}
}
"test.pl" 13 lines, 265 characters
peters@ronin:~> perl test.pl
a=0, b=0, c=0
a=0, b=0, c=1
true1
true2
true3
a=0, b=1, c=0
a=0, b=1, c=1
true1
true2
true3
a=1, b=0, c=0
a=1, b=0, c=1
true1
true2
true3
a=1, b=1, c=0
true1
true2
true3
a=1, b=1, c=1
true1
true2
true3
$_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0
F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B
Antworten mit Zitat

View full thread Kommas: Loeschen