in reply to The 16 digit number dilemma.

Another approach might be to re-implement your C++ code as a library and then use Inline::C or the like so you're accessing the exact same underlying code from C++ or from Perl.