I am creating a quiz generation script that pulls questions from a file and displays them "randomly". the script calls a .txt file which defines how many questions from each section of the pool to display. while the script functions mostly correctly, it has a random hiccup where it will display...
Create a html template file then insert something like +++ where you want to have the logic displayed. Then just have your script split the template file at the plusses.
I apologize for this post as I can see that the question had been adressed several times in the past however, I am having difficulty applying the examples to my code. I am using a purchased database script and I need to randomize the output. The script currently uses
@keepers=sort(@keepers)...
Ok... Sorry to bother you guys with this one again but a site visitor pointed this one out to me. Aparrently multi line answers with a "D." prefix are only getting the first line parsed.
if (/^D\./) {
print "|$_\n";
next MAIN;
}
I assume that it makes the first loop then gets sent...
I want to thank everyone who helped me with this!!!!
Kevin, that last one you posted worked beautifully. I took all day yesterday analyzing the output of all 3 files just to be sure before I gave a report.
I have been to other forums in the past trying to find help with similar problems and...
Thanks again Kevin. That does work however it also brings up one more little issue...
After making the last capture optional it will print out a correct string to the file but, only if there is what appears to be a hidden character directly following the answer. example, in the 2006tech.txt...
Kevin,
I have discovered one slight error... I now believe that I may understand how (/(\S\S)(\S)(\S\S)\s+\(([ABCD])\)\s+(\[.+?\])/) { is doing it's pattern matching however, if the question does not have a pert 97 reference ([ABCD]) is is skipped over and not written to the file. How would...
OUTSTANDING!!! Thank you so very much Kevin! That does in fact work, and better than I hoped for. Your assistance is appreciated more than you know!!
If I may impose upon you for one more thing...
I am trying to learn perl for my personal use, could you please explain how this little piece...
Thank You for anything you can provide. Here is the code that I wrote to parse the first file. Bear in mind that my Perl skill level being somewhere between beginner and novice, you may cringe at this ugly code!!!! It worked really well with the exception of a few errors due to anomalies in...
KevinADC,
No, this is not school work. I am the president of and website administrator for our local amateur radio club. my intent is to use the databases to assist prospective hams in studying for their tests.
I know I should have posted this earlier but I didn't think of it. I wish I could edit my previous posts to add it but,...
Anyway, here is a link to the one file that I did get parsed just so that the layout of the output can be seen. Please understand that there are extra fields involved...
Here are links to all 3 files that I'm trying to get parsed into the flatfile db's. I post this just so that anyone trying to help me can see the differences in the files and possibly understand why I am having difficulty getting one script to work for all 3. Being that my Perl skill level is...
I have a large file that I need to parse into a tab delimited file for use in a database. While I can get it parsed to a certian extent, entries with multiple lines to the questions and answers are throwing me for a loop!! Can anyone please show me the correct method for doing this? Here is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.