I'm sorry, I don't have Perl so I don't have YaBB installed either. In case you wish, I can try looking at your particular database and correct the converter accordingly, might be quicker, I'm afraid. Please let me in case you agree, I will PM you an account to use.
Alternatively:
About the layout problem, can you please make a screenshot or link to your forum, to show what happens? I'm sorry, I don't fully understand it.
About the errors "has the wrong number of replies": normally a 'find and repair' should be able to fix that, in case the rest of the information is there. It could be solved manually as well, or with a query, but again, if the rest of the information is correctly transfered over.
Eventually, please try (in phpmyadmin, on the converted database, not tested):
UPDATE smf_topics AS t SET numReplies =
(SELECT count(ID_MSG) FROM smf_messages AS m WHERE m.ID_TOPIC = t.ID_TOPIC)
About the errors "the subject is currently not stored in the subject cache", these are really not important, and the 'find and repair' should be able to fix them anyway.
About the PMs: if you are certain that always the subject and the name of the user from which the message comes are messed up, then please try this: (yabb22_to_smf.php)
$row = array(
'fromName' => substr(htmlspecialchars($userData[$i][0]), 0, 255),
'subject' => substr($userData[$i][1], 0, 255),
'msgtime' => !empty($userData[$i][2]) ? (int) $userData[$i][2] : '0',
'body' => substr(!empty($userData[$i][3]) || empty($userData[$i][7]) ? $userData[$i][3] : $userData[$i][7], 0, 65534),
'ID_MEMBER_FROM' => 0,
'deletedBySender' => $is_outbox ? 0 : 1,
'temp' => htmlspecialchars(substr($entry, 0, -4)),
);
$row = array(
'fromName' => substr($userData[$i][1], 0, 255),
'subject' => substr(htmlspecialchars($userData[$i][0]), 0, 255),
'msgtime' => !empty($userData[$i][2]) ? (int) $userData[$i][2] : '0',
'body' => substr(!empty($userData[$i][3]) || empty($userData[$i][7]) ? $userData[$i][3] : $userData[$i][7], 0, 65534),
'ID_MEMBER_FROM' => 0,
'deletedBySender' => $is_outbox ? 0 : 1,
'temp' => htmlspecialchars(substr($entry, 0, -4)),
);