Hello,
Of course this regex only removes the leading spaces only, or the
trailing spaces if there are no leading spaces.
You can use
$string =~ s/^ +| +$//g; # g for global matches
or do it in 2 steps:
$str =~ s/^ +//;
$str =~ s/ +$//;


Hope this helps,,,

Aziz,,,

In article <00a301c1101e$ac7d4a40$0200005a@drevlin>, "Brian"
<[EMAIL PROTECTED]> wrote:
> This should do it for you:
> 
> $sring =~ s/^ +| +$//;

>> -----Original Message-----
>> A simple Q........
>> well i want to remove spaces if any in the beginning and end of a
>> string.
>> how to do this...........

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to