Yeah, I read your response after I posted mine. (And shouldn't it be s/\s+$/ / ? Notice the space.)
In reply to Re^3: why spaces! XML::DOM by Lawliet in thread why spaces! XML::DOM by huiling