mistamutt has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I'm new to Perl and I've been reading an intro book as well as a few of the guides and FAQs on this site as well as a couple of others. I have a txt file written with HTML containing questions and answers. I've so far been able to get the question with the answer on the same line, and after the answer to the question, for some reason, the end tags still remain. My question(s) are:
- How do I save a string starting at the beginning of the line, until the question mark? Basically what I'm trying to do is store the question in a variable, then the answer in a separate one (which would start from the white space after the question mark). I've been reading and trying for a couple of days without much success, so if anyone could help me I'd greatly appreciate it
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Handling lines and saving them into variables
by chromatic (Archbishop) on Feb 15, 2011 at 05:54 UTC | |
Re: Handling lines and saving them into variables
by ciderpunx (Vicar) on Feb 15, 2011 at 00:58 UTC | |
by mistamutt (Novice) on Feb 15, 2011 at 02:02 UTC | |
by ciderpunx (Vicar) on Feb 15, 2011 at 09:03 UTC | |
Re: Handling lines and saving them into variables
by jeffa (Bishop) on Feb 15, 2011 at 20:50 UTC | |
Re: Handling lines and saving them into variables
by sundialsvc4 (Abbot) on Feb 15, 2011 at 15:11 UTC |
Back to
Seekers of Perl Wisdom