note
shockme
[broquaint] is pretty much right on. Given your example input, it'll work.
<P>
As to removing spaces, the following will do it:
<code>
my $str = "Bob ";
$str =~ s/\s$//; # or s/ $//;
print "|$str|\n";
</code>
<div class="pmsig"><div class="pmsig-111056">
<P>
<I>If things get any worse, I'll have to ask you to stop helping me.</I>
</div></div>
312216
312216