Commit | Line | Data |
---|---|---|
8d063cd8 LW |
1 | #!./perl |
2 | ||
c212fd85 | 3 | print "1..6\n"; |
8d063cd8 LW |
4 | |
5 | @x = (1, 2, 3); | |
6 | if (join(':',@x) eq '1:2:3') {print "ok 1\n";} else {print "not ok 1\n";} | |
7 | ||
8 | if (join('',1,2,3) eq '123') {print "ok 2\n";} else {print "not ok 2\n";} | |
9 | ||
10 | if (join(':',split(/ /,"1 2 3")) eq '1:2:3') {print "ok 3\n";} else {print "not ok 3\n";} | |
c212fd85 IZ |
11 | |
12 | my $f = 'a'; | |
13 | $f = join ',', 'b', $f, 'e'; | |
14 | if ($f eq 'b,a,e') {print "ok 4\n";} else {print "# '$f'\nnot ok 4\n";} | |
15 | ||
16 | $f = 'a'; | |
17 | $f = join ',', $f, 'b', 'e'; | |
18 | if ($f eq 'a,b,e') {print "ok 5\n";} else {print "not ok 5\n";} | |
19 | ||
20 | $f = 'a'; | |
21 | $f = join $f, 'b', 'e', 'k'; | |
22 | if ($f eq 'baeak') {print "ok 6\n";} else {print "# '$f'\nnot ok 6\n";} |