My question is, is there a good resource that explains nesting statements.
As an example.
To change
primary
Factory CTS 1.9.0(46) P1
*Slot 1 CTS 1.10.2(42) P1
To
primary *Slot 1 CTS 1.10.2(42) P1
The code above only gives me whats shown in blue. I want to perform a few more functions in order to arrive at the result shown in red.
Again, Im looking to learn how to nest commands. Of course in this case probably s/// and tr.
Thanks in advance.
As an example.
To change
primary
Factory CTS 1.9.0(46) P1
*Slot 1 CTS 1.10.2(42) P1
To
primary *Slot 1 CTS 1.10.2(42) P1
Perl:
while(<$in>){
print $out $_ if /^primary$/ .. /\*Slot /;
}
The code above only gives me whats shown in blue. I want to perform a few more functions in order to arrive at the result shown in red.
Again, Im looking to learn how to nest commands. Of course in this case probably s/// and tr.
Thanks in advance.