我使用的是從CAM :: PDF中提取PDF並將其打印到文本中的getpdftext.pl,但在我的web應用程序中,我想調用這個getpdftext.pl內部的.cgi腳本。你能建議我該怎麼做或如何繼續前進。我試圖將getpdftext.pl轉換爲getpdftext.cgi,但它不起作用。如何在.cgi腳本中調用.pl文件
感謝所有
這是從我的request_admin.cgi腳本中提取
my $filename = $q->param('quote');
:
:
:
&parsePdf($filename);
#function to extract text from pdf ,save it in a text file and parse the required fields
sub parsePdf($)
{
my $i;
print $_[0];
$filein = "quote_uploads/$_[0]";
$fileout = 'output.txt';
print "inside parsePdf\n";
open OUT, ">$fileout" or die "error: $!";
open IN, '-|', "getpdftext.pl $filein" or die "error :$!" ;
while(<IN>)
{
print "$i";
$i++;
print OUT;
}
}
您的意思是'打開「 - |」,「perl的getpdftext.pl $ filein「或死」錯誤:$!「;'? – 2011-10-12 04:15:20
yes jack ..i指的是「perl getdpftext.pl $ filein」 – sandyutd
我收到以下錯誤:權限在/request_admin.cgi行301, line 414.,referer http://abc.com/adminForm.html Line 301:打開OUT,「> $ fileout」或死掉「error:$!」; –
sandyutd