Converted all dollar maths into parentheses (or square brackets) using
the perl script debuck.  Hopefully this hasn't introduced any actual
changes ...