$str =~ s/^\s+|\s+$//g; [download]
Cheers - L~R
In reply to Re: regexp problem by Limbic~Region in thread regexp problem by jeanluca