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

oh! Right! No dot in there. s/^\s*//; s/\s*$//; instead of course. s/^\s+//; s/\s+$//; should work as well.

Replies are listed 'Best First'.
Re^4: trimming space from both sides of a string
by jwkrahn (Abbot) on Oct 16, 2010 at 19:31 UTC

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