in reply to
regexp problem
jeanluca
,
Perhaps I am being dense but it sounds like what you want to do is remove leading and trailing whitespaces. This is a FAQ IIRC. In any case - the following should do the trick:
$str =~ s/^\s+|\s+$//g;
[download]
Cheers -
L~R
Comment on
Re: regexp problem
Download
Code
In Section
Seekers of Perl Wisdom