12 for $i ( 1,2,5,4,3 ) {
14 open(FH, "> $file") || die "can't create $file: $!";
15 print FH "not ok " . $j++ . "\n";
16 close(FH) || die "Can't close $file: $!";
24 @ARGV = mkfiles(1..3);
27 print STDOUT "# initial \@ARGV: [@ARGV]\n";
36 @ARGV = mkfiles(1..3);
39 print STDOUT "#final \@ARGV: [@ARGV]\n";
54 print STDOUT "# Calling other\n";
58 @ARGV = mkfiles(5, 4);
60 print STDOUT "# inner \@ARGV: [@ARGV]\n";
68 $files[$_] ||= tempfile();
70 my @results = @files[@_];
71 return wantarray ? @results : @results[-1];
74 END { unlink map { ($_, "$_.bak") } mkfiles(1..5) }