home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / perl / os2perl / join.t < prev    next >
Text File  |  1991-04-12  |  353b  |  13 lines

  1. #!./perl
  2.  
  3. # $Header: join.t,v 4.0 91/03/20 01:53:17 lwall Locked $
  4.  
  5. print "1..3\n";
  6.  
  7. @x = (1, 2, 3);
  8. if (join(':',@x) eq '1:2:3') {print "ok 1\n";} else {print "not ok 1\n";}
  9.  
  10. if (join('',1,2,3) eq '123') {print "ok 2\n";} else {print "not ok 2\n";}
  11.  
  12. if (join(':',split(/ /,"1 2 3")) eq '1:2:3') {print "ok 3\n";} else {print "not ok 3\n";}
  13.