in reply to Dot star okay, or not?

My prefered way is to do it in 2 lines:
$string=~s/^\s+//; $string=~s/\s+$//;