What about:

$string =~ s/s\b//g;

-----Original Message-----
From: Mandar Rahurkar [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 19, 2004 8:06 PM
To: Tim Johnson
Cc: [EMAIL PROTECTED]
Subject: RE: Regexp

Hi,
   I am too old to have homeworks on perl :)
I tried for the first case:
s/\ws\b/$1/;

but trick to understand is that I need to substitute forests with
forest. 
I can probably use substr however was looking for a elegant solution.

Mandar


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to