This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cleaner close on tests, take 2
[perl5.git] / t / comp / script.t
index d70b767..2dbdaf2 100755 (executable)
@@ -16,7 +16,7 @@ if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
 
 open(try,">Comp.script") || (die "Can't open temp file.");
 print try 'print "ok\n";'; print try "\n";
-close try;
+close try or die "Could not close: $!";
 
 $x = `$Perl Comp.script`;