I have used the LWP:\imple module and saved the source of a website in a file. I am trying to extract all the data between the <head> tags and pass it to a variable to process.
So far I can't seem to extract the data properly. Any suggestions?
What exactly does /is do? Also one more question if I try to extract the meta tags and place each individually in array will it work? Assuming that their maybe 1 or meta tags inside.
Something like this:
my (@m) = $s =~ m/<meta (.*?)>/is;
You can look up the regexp modifiers in any regexp tutorial.
i - case insentive matching
s - match as a single string so matches across newlines
g - global match, works like grep, finds all matches in a string/line
Last edited by KevinADC; May 14th, 2009 at 6:02 am.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.