home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / perl4036.zip / t / op / append.t next >
Text File  |  1993-02-08  |  477b  |  22 lines

  1. #!./perl
  2.  
  3. # $Header: append.t,v 4.0 91/03/20 01:51:23 lwall Locked $
  4.  
  5. print "1..3\n";
  6.  
  7. $a = 'ab' . 'c';    # compile time
  8. $b = 'def';
  9.  
  10. $c = $a . $b;
  11. print "#1\t:$c: eq :abcdef:\n";
  12. if ($c eq 'abcdef') {print "ok 1\n";} else {print "not ok 1\n";}
  13.  
  14. $c .= 'xyz';
  15. print "#2\t:$c: eq :abcdefxyz:\n";
  16. if ($c eq 'abcdefxyz') {print "ok 2\n";} else {print "not ok 2\n";}
  17.  
  18. $_ = $a;
  19. $_ .= $b;
  20. print "#3\t:$_: eq :abcdef:\n";
  21. if ($_ eq 'abcdef') {print "ok 3\n";} else {print "not ok 3\n";}
  22.