6 require './test.pl'; # for which_perl() etc
10 my $Perl = which_perl();
12 my $filename = tempfile();
14 $x = `$Perl -le "print 'ok';"`;
16 is($x, "ok\n", "Got expected 'perl -le' output");
18 open(try,">$filename") || (die "Can't open temp file.");
19 print try 'print "ok\n";'; print try "\n";
20 close try or die "Could not close: $!";
22 $x = `$Perl $filename`;
24 is($x, "ok\n", "Got expected output of command from script");
26 $x = `$Perl <$filename`;
28 is($x, "ok\n", "Got expected output of command read from script");