我有一个程序'thursday.pl',从命令行执行时效果非常好。
当我从另一个程序的菜单中执行它时,如下所示:
if ($val eq 2 ) {$dummy = `$perlPath $hnrPath/thursday.pl`; goto HNR;}
我收到以下编译错误消息:
在/perl/hsf/options/hnr/thursday.pl第52行的\ o {}上缺少括号,靠近“$ startDate to $ lastDate” 执行/perl/hsf/options/hnr/thursday.pl因编译错误而中止“
它抱怨的第52行是在HERE声明的中间:
# print instructions for exdiv screen
my $message = <<"End_Message";
When you hit enter the program will bring up the ExDiv Selection screen.
Sign In if necessary
SET SEARCH CRITERIA
1. Set date range for $startDate to $lastDate <-- THIS IS LINE 52 -->
2. Uncheck all boxes except Stocks and ETFs
3. do the search.
4. Save screen as 'weekly.htm' in perl\hsf\options\HnR
5. Close the browser.
This screen will re-appear.
Then hit Enter, to invoke XdivScrape.pl
End_Message
print "\n$message\n";
斜杠o看起来像是在排序时可能从dir命令获得的错误消息,但为什么会在这里呢?
为什么从其他程序执行时,从命令行编译好的程序会出现此错误?