in reply to Re^3: trimming space from both sides of a string
in thread trimming space from both sides of a string

s/^\s+//; s/\s+$//; works better than s/^\s*//; s/\s*$//;.