This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 3.0 patch #44 patch #42, continued
[perl5.git] / t / io.inplace
CommitLineData
8d063cd8
LW
1#!./perl -i.bak
2
a687059c 3# $Header: io.inplace,v 3.0 89/10/18 15:26:25 lwall Locked $
8d063cd8
LW
4
5print "1..2\n";
6
7@ARGV = ('.a','.b','.c');
8`echo foo | tee .a .b .c`;
9while (<>) {
10 s/foo/bar/;
11}
12continue {
13 print;
14}
15
16if (`cat .a .b .c` eq "bar\nbar\nbar\n") {print "ok 1\n";} else {print "not ok 1\n";}
17if (`cat .a.bak .b.bak .c.bak` eq "foo\nfoo\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}
18
19unlink '.a', '.b', '.c', '.a.bak', '.b.bak', '.c.bak';