in reply to Quick solutions to easy problems

What happens when the truncated OPERATORIDs are not unique? You'd be much better off patching system B to accept longer ones. Failing that, have your perl script keep track of all IDs it's seen (original and truncated versions) and generate unique ones when needed.