MichelleLacy
asked on
conditional replace using Perl
I have a body of text and I want to do a conditional replace based, I am assuming with an if statement.
text example: So I want to replace part of line 3, the attribute name, which is "Significance", with a concatenation of line 1 value, in this case, "AtPID LR score" + "Significance". How do I do this?
line1 <attr name= "mref" value = "AtPID LR score" index = "0" />
line 2<attr name= "Method" value = "AtPID LR score" index = "0" />
line 3 <attr name= "Significance" value = "1248.12" index = "0"/>
text example: So I want to replace part of line 3, the attribute name, which is "Significance", with a concatenation of line 1 value, in this case, "AtPID LR score" + "Significance". How do I do this?
line1 <attr name= "mref" value = "AtPID LR score" index = "0" />
line 2<attr name= "Method" value = "AtPID LR score" index = "0" />
line 3 <attr name= "Significance" value = "1248.12" index = "0"/>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you. I used it right away, but forgot to close the session.
ASKER