Perl で 2 つの異なるファイルを 1 行ずつ交互に印刷しようとしています。これの構文は何ですか? コード:
#1. Initialize: log file path and ref Log file path
use strict;
use warnings;
my $flagRef="true";
my $logPath="C:/ExecutionSDKTest_10.2.2/Logs/${ARGV[0]}.log";
my $refLogPath="C:/ExecutionSDKTest_10.2.2/Logs/${ARGV[1]}_Ref.properties.txt";
#print log file path followed by reflog path: P
#print "$logPath\n$refLogPath\n";
#2. Traverse log file and refLog file to replace ALL instances of:
#"hr:min:sec" with "xx:xx:xx"
open INLOG, $logPath or die $!;
open INREF, $refLogPath or die $!;
#equiv: >>$logLine=readline(*FHLOG);
#$logLine= <FHLOG>;
#$refLine= <FHREF>;
while (<INLOG>) #syntax
{
print "$_";
#I'd like to print lines from INREF too! :)
#Syntax?
}