Hello all,
I have a tagged text file as below:
<tag1>Complete</tag1><tag2>3386</tag2><tag3>77844</tag3><tag4>11</tag4><tag5>30</tag5><tag6>4.7</tag6>If the content of <tag1> is "Complete", the content of <tag6> should be multiplied by 100. I tried the following code but did not work. Can someone help me on this?
if($_ =~ /<tag1>Complete<\/tag1>/) { $_ =~ s/<tag6>(.+?)<\/tag6>/<tag6>$1 * 100<\/tag6>; }
In reply to Manipulating a string in a tagged file by rsriram
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |