use strict;
require './test.pl';
-$^I = 'bak*';
+$^I = 'bak.*';
# Modified from the original inplace.t to test adding prefixes
plan( tests => 2 );
-my @tfiles = ('.a','.b','.c');
-my @tfiles_bak = ('bak.a', 'bak.b', 'bak.c');
+my @tfiles = (tempfile(), tempfile(), tempfile());
+my @tfiles_bak = map "bak.$_", @tfiles;
-END { unlink_all('.a','.b','.c', 'bak.a', 'bak.b', 'bak.c'); }
+END { unlink_all(@tfiles_bak); }
for my $file (@tfiles) {
runperl( prog => 'print qq(foo\n);',