On Sun, Jun 17, 2001 at 07:35:06PM -0700, Lonya wrote:
> Hi all,
>
> I could use some help. I'm trying to retain punctuation in sentences
> when doing a spell check.
>
> Say I have a line like this:
> This *s a te*t, this *s only a te*t.
>
> And I'd like to replace "te*t," with "test," after a dictionary
> lookup. Well, I can split out the punctuation easily enough, but I
> don't know how to join it back in later.
Why do you have to remove punctuation in the first place ?
% cat hello.pl
$a = "t*st";
print "$a\n";
$a =~ s/\*/e/;
print "$a\n";
% perl hello.pl
t*st
test
-giorgos