Update:
My apologies for the confusion. The values have no space around the "=" which is why I am splitting it up by \s+.
Also. Just to provide a little more clarification. I am trying to associate like values. So john.doe in this particular case correlates with john.doey. I need to associate these, and print them on one line. Where I need help is, I also need to extract doe, and doey, and print them on the same line.
My criteria for matching values is:
/^john.doe/m
/^john.doey/m
/^doe/m
/^doey/m
I need to explicitly associate john.doe with john.doey. If I use doe, and doey as my search strings, I run into issues with associating them correctly. So the suffix is common in all of the values I am looking for, however the prefix is different. Please let me know if I need to clarify further. Thank you so much for your help!
Greetings Monks.
Here is a little background. I am using LWP to grab a web page.
The web page looks something like:
john.doe=18192812
tim=lasdflkdsajf
john.doey=jr-1234
doe=12912039
bob=sdfasfd
doey=jr-1235
So far I have split up the content and tossed it into an array:
@data = split /\s+/, $html_page;
This now gives me
@data = ("john.doe = 18192812", "tim = lasdflkdsajf", "john.doey = jr-
+1234", "doe = 12912039", "bob = sdfasfd", "doey = jr-1235")
I need to grab the values from john.doe, and john.doey.
I also need to grab the values from doe and doey.
The goal is to correlate them and print them on one line as such.
print "$johndoevalue $johndoeyvalue\n";
print "$doevalue and $doeyvalue\n"
I am trying to figure out what the most efficient way to extract this is.
Any help is mucho appreciado.
Thanks!