Removing leading and trailing spaces

[email protected] (Judy & Jim Schueckler)
Newsgroups perl.beginners.cgi
Message-ID <[email protected]>
Regular expressions drive me crazy!

I have a perl string variable that comes from a cgi form.

I need code to remove one or more leading or trailing spaces without 
removing internal spaces.

Please help!
Jim Schueckler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.