in reply to Perl junior entreats monastery for course help
Hello
They're your research questions, not my research questions, so I'm not going to give you a straight answer. Sorry, but I hope you'll find the following useful.
Question 1: take a look at the Perl FAQ section discussing finding unique elements in a list, and the subsequent section on "How can I tell whether a list or array contains a certain element?". The good authors of the document say:
Hearing the word "in" is an indication that you probably should have used a hash
Question 2: Try following the function calls through. The first function that gets called is DoSomething, and the argument it gets passed is the big long string about "Bradburn vs Harris". The functions do some stuff manipulating the strings with regular expressions, and those hashes turn up again with functions like exists. Try reading up on these.
You could try running the program too, assuming you trust the person it came from. I'll give you a clue too, it won't do anything harmful to your PC. You could install Perl, save the program in a file and run it to see what happens. You'll need to correct a typo in the line sub StripWhiteSappace, and you might add a DEBUG function to follow what's going on.
HTH
ViceRaid
|
|---|