# This code originally posted by faq_monk for ($string) { s/^\s+//; s/\s+$//; }