in reply to Regular Expression and trimming


$string =~ s/^\s*(.*?)\s*$/\1/;

"Trying to be a SMART lamer" (thanx to Merlyn ;-)