summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/perl/t/op/join.t
blob: a6678e979011ad15bd8f61e0e66335dcf86ca134 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!./perl

# $Header: /home/cvs/386BSD/ports/lang/perl/t/op/join.t,v 1.1.1.1 1993/08/23 21:30:02 nate 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";}
OpenPOWER on IntegriCloud