Hello monks,
I am thankful to all of you who have replied.
I was able to modify the string in such a way that when if there is an & sign it means that it is a different group now it is possible to say when there is a pair and when it is triads. But still I am confused on how will I tell perl that when you encounter & you need to insert it into another line
.
Here we can see that an & says that it is a new data and the 3rd column is differentiated through a ||.