Convert all unimaginative (ie race condition) temporary file names to
[p5sagit/p5-mst-13.2.git] / t / io / iprefix.t
index 25dd69d..9e09ce0 100755 (executable)
@@ -2,16 +2,16 @@
 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);',