6 require './test.pl'; # for which_perl() etc
9 my $Perl = which_perl();
11 my $filename = tempfile();
15 $x = `$Perl -le "print 'ok';"`;
17 if ($x eq "ok\n") {print "ok 1\n";} else {print "not ok 1\n";}
19 open(try,">$filename") || (die "Can't open temp file.");
20 print try 'print "ok\n";'; print try "\n";
21 close try or die "Could not close: $!";
23 $x = `$Perl $filename`;
25 if ($x eq "ok\n") {print "ok 2\n";} else {print "not ok 2\n";}
27 $x = `$Perl <$filename`;
29 if ($x eq "ok\n") {print "ok 3\n";} else {print "not ok 3\n";}