Then, one year later when once again needing to revise shipping rates, I gave it another try. And got it working. The required Perl modules are available from CPAN: Statistics::OLS; although Business::CanadaPost is available at CPAN, you'll save yourself some grief by starting with the updated version from the link below. (The good people at Canada Post have avoided meaningful and badly needed improvements such as quoting Oversized-Letter and Light-Packet rates, but have made "change for the sake of change" revisions that serve no useful purpose yet do invalidate previously working interfaces such as that Perl interface, grumble grumble.)
Here is the Perl script.
Here is an updated Business::CanadaPost module to reflect changes at Canada-Post.