If you fix the noop error, the script will still fail on the $regsubex use, as both noop and $regsubex were added with 6.17. I suggested 6.21 because $regsubex had some bugs in 6.17.
So in addition to changing the noop command, you also have to convert the $regsubex to $regsub or some other solution. You would also have to add a few equal (=) signs where vars are being set and need pre-evaluated.
Should be easier just to upgrade.