in reply to Perl and maths

I think this would easily get complicated. Only thing that I can come up with is that you need functions to take that input apart. Eg. array with one element that has one calculation each. Remember that order needs to be two fold, order in line and order to do the calculation. Also function that parses your array back into printable line.

Then you just do one calculation for each element and print out whats between. Since I'm at office, I'm not going to start coding, but thats a how i would start doing something like this. Note that since I haven't done any Perl/Tk stuff, i can't comment on how that should be done. Good luck :).