I've been using this to strip leading and trailing whitespace from a string: $string =~ s/^\s*(.*?)\s*$/$1/;
But, nodes like Death to Dot Star make me a little wary of using the (.*?)
Is this solution correct? Or is there a better way? (of course... there's always a better way :)