blob: f3555a63ccc11fa66ad4e8e0d70a53798fad8a92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!./perl
# $Header: op.join,v 1.0 87/12/18 13:13:46 root Exp $
print "1..3\n";
@x = (1, 2, 3);
if (join(':',@x) eq '1:2:3') {print "ok 1\n";} else {print "not ok 1\n";}
if (join('',1,2,3) eq '123') {print "ok 2\n";} else {print "not ok 2\n";}
if (join(':',split(/ /,"1 2 3")) eq '1:2:3') {print "ok 3\n";} else {print "not ok 3\n";}
|