Thanks, that ought to do the trick quite nicely. I'm sure there's a much nicer way to do all of this, but I've got it working, don't want to mess around with it too much (unless I find myself bored at some point :-)
nimdokk,
See Multiplicative Operators in perldoc perlop for more details. Having code that works is important, but you might want to check out Value of "RE"-coding for the newbie to see why there can be value in messing around as you put it.