frank_2k4 has asked for the wisdom of the Perl Monks concerning the following question:
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/m /^john.doey/m /^doe/m /^doey/m
So far I have split up the content and tossed it into an array:john.doe=18192812 tim=lasdflkdsajf john.doey=jr-1234 doe=12912039 bob=sdfasfd doey=jr-1235
This now gives me@data = split /\s+/, $html_page;
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.@data = ("john.doe = 18192812", "tim = lasdflkdsajf", "john.doey = jr- +1234", "doe = 12912039", "bob = sdfasfd", "doey = jr-1235")
I am trying to figure out what the most efficient way to extract this is. Any help is mucho appreciado. Thanks!print "$johndoevalue $johndoeyvalue\n"; print "$doevalue and $doeyvalue\n"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Need to get multiple values.
by davido (Cardinal) on Dec 20, 2005 at 19:01 UTC | |
|
Re: Need to get multiple values.
by Roy Johnson (Monsignor) on Dec 20, 2005 at 18:52 UTC | |
|
Re: Need to get multiple values.
by meraxes (Friar) on Dec 20, 2005 at 18:54 UTC |