in reply to Annoying whitespace(s)...

Could it be because you're using
$Buffer = ' ';
and not
$Buffer = '';?