我總是期待noob。 我寫一想到劇本,我想算字符串「好」的出現次數,並從以下輸出每次出現做一個動作一個測試用例: Reloading configuration on all nodes
Reloading configuration on node 1 (node1-c5)
OK
Reloading configuration on node 2 (node2-c5)
OK
Reloa
這裏的期望腳本是我的Perl腳本(a.pl) #!/usr/bin/perl
$logfile = "./a.log";
open(LOGFILE_Handle, ">$logfile") or die "Error : Can not open $logfile !!! \n\n ";
print LOGFILE_Handle "a.pl: 1 ";
system "./a.exp ";