I tested the script last night. Pearl takes a few hundred pages of text and puts them into a single variable. Do lots of operations. Split the varible on the newline and form an array. Do operations on the array. Dump everything do disk.
Phew. I adore perl and regular expressions.
I've also been playing with JEdit. This is a java based scriptable editor. Yay fun. Without knowing what I was doing, it took me 45 minutes to record a macro, learn how to edit a macro, and come out with a macro that converts HTML tables to Wiki format. Fun.