For the latter part of this week I’ve been taking a crash course in Perl programming so that I can modify the scripts Nathan wrote to automate the marking process for coms3200 so that they work for comp4301. I’ve finished the modifications in the script I think (I hope). The thing is I need to modify my solution to the assignment so that it writes files which the script can then check. Otherwise there is no way to tell whether an operation ran correctly or whether the correct exception was thrown at the correct time and so forth. It’s ugly, but it should work and it should save me some time. It also guarantees that everybody’s solution is subjected to exactly the same set of tests.
Perl is kind of cryptic, especially when it comes to specifying the parameters to procedures. To specify that a procedure, let’s call it foo, takes a string as argument, you declare it as
sub foo($) { ... }
To declare that it should take two strings it’s just $$. Lists are specified with an @ symbol. There are some other things that are a bit strange to me as well. What I do like is the way it does regular expressions. String matching and manipulation is really easy. Anyway, enough of this talk, because I’m not a nerd, remember.
Looks like Nigel and I will be headed to Caloundra this weekend since Mum kind of needs us to take some stuff up there. I hope it doesn’t rain this weekend!