diff options
author | M. J. T. Guy <mjtg@cus.cam.ac.uk> | 2000-07-25 15:18:57 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-07-26 04:39:57 +0000 |
commit | 1ec94568ca12249aa865999d7dec5eb1fa3123c7 (patch) | |
tree | 3f6507851827f1a3e1d3c62c6bfa1928ccde68f1 /t/op/split.t | |
parent | 154545c719744e0c72089d7eedb40eeb83bbbcc7 (diff) | |
download | perl-1ec94568ca12249aa865999d7dec5eb1fa3123c7.tar.gz |
split /^/
Message-Id: <E13H4bp-00062h-00@libra.cus.cam.ac.uk>
(with notes from tchrist and gbarr)
p4raw-id: //depot/perl@6441
Diffstat (limited to 't/op/split.t')
-rwxr-xr-x | t/op/split.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/op/split.t b/t/op/split.t index 07f0098dbd..58a311386a 100755 --- a/t/op/split.t +++ b/t/op/split.t @@ -2,7 +2,7 @@ # $RCSfile: split.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:26 $ -print "1..26\n"; +print "1..27\n"; $FS = ':'; @@ -113,3 +113,8 @@ if (($res = join(".",@ary)) eq "a.b.c.d") {print "ok 25\n";} else {print "not ok # use of match result as pattern (!) 'p:q:r:s' eq join ':', split('abc' =~ /b/, 'p1q1r1s') or print "no "; print "ok 26\n"; + +# /^/ treated as /^/m +$_ = join ':', split /^/, "ab\ncd\nef\n"; +print "not " if $_ ne "ab\n:cd\n:ef\n"; +print "ok 27\n"; |