More or less this:
$inn .= $in if (($in =~ /^NOTE/ .. $in =~ /^X-ACCOUNT/) && $in !~ /^X-ACCOUNT/);
Using implicit $_
would make it shorter, perhaps:
while(<IN>) {
$inn .= $_ if (/^NOTE/ .. /^X-ACCOUNT/ and !/^X-ACCOUNT/);
See perlop for Range Operators and perhaps also perlop for why and
is lower precedence than &&
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…