Hi there,
I am trying to learn Perl at present but am coming very unstuck at pattern matching. I understand the principles but not the syntax or how t use the data matched.
I am trying to read files [.txt & .html] (with permission, from remote server) for inclusion to my site (just the bits I want). I think I would use LWP Simple to get the file, reading it into the $_ variable. I would then match the file for the text I want.
Now here is where the problem starts, some of the files have a fixed length (number of lines) before the real data starts, other have the wanted data in the middle of the file so I would need to define a start and stop point.
My Questions:
Can anybody help me to understand how to pattern match?
Are there any idiot proof (!) tutorials I should read.
I am trying to learn Perl at present but am coming very unstuck at pattern matching. I understand the principles but not the syntax or how t use the data matched.
I am trying to read files [.txt & .html] (with permission, from remote server) for inclusion to my site (just the bits I want). I think I would use LWP Simple to get the file, reading it into the $_ variable. I would then match the file for the text I want.
Now here is where the problem starts, some of the files have a fixed length (number of lines) before the real data starts, other have the wanted data in the middle of the file so I would need to define a start and stop point.
My Questions:
Can anybody help me to understand how to pattern match?
Are there any idiot proof (!) tutorials I should read.