Perl 反引号调用求助?

Perl 反引号调用求助


红糖糍粑
浏览 659回答 3
3回答

aluckdog

my $cur_dir = `pwd`;chomp($cur_dir);my $file = "$cur_dir/bin/ProcessDir.exe";if(-e $file){my $str = `$file`; #see below comments:print "str is $str \n";}#直接在windows cygwin下面调用返回正常,但通过CGI调用后$str返回为空string.解决把 $cur_dir 输出到网页上查看是什么内容。用 print "$@ $! $^E $?\n" 看看这些变量都什么内容

侃侃无极

用system或者反引号都可以如:system("perl b.pl 1")
打开App,查看更多内容
随时随地看视频慕课网APP