5 $^I = $^O eq 'VMS' ? '_bak' : '.bak';
9 my @tfiles = ('.a','.b','.c');
10 my @tfiles_bak = (".a$^I", ".b$^I", ".c$^I");
12 END { unlink_all('.a','.b','.c',".a$^I", ".b$^I", ".c$^I"); }
14 for my $file (@tfiles) {
15 runperl( prog => 'print qq(foo\n);',
16 args => ['>', $file] );
28 is ( runperl( prog => 'print<>;', args => \@tfiles ),
30 "file contents properly replaced" );
32 is ( runperl( prog => 'print<>;', args => \@tfiles_bak ),
34 "backup file contents stay the same" );