s/^\s+//; # strip leading whitespace s/[^\S\n]+$//; # strip trailing whitespace