#!./perl
-# $Header: op.substr,v 3.0 89/10/18 15:31:52 lwall Locked $
+# $Header: op.substr,v 3.0.1.1 90/10/16 10:56:35 lwall Locked $
-print "1..19\n";
+print "1..22\n";
$a = 'abcdefxyz';
substr($a,-1,1) = '12345678';
print $a eq '12345678abcXYZ12345678' ? "ok 19\n" : "not ok 19\n";
+$a = 'abcdefxyz';
+
+print (substr($a,6) eq 'xyz' ? "ok 20\n" : "not ok 20\n");
+print (substr($a,-3) eq 'xyz' ? "ok 21\n" : "not ok 21\n");
+print (substr($a,999) eq '' ? "ok 22\n" : "not ok 22\n");