in reply to Defenetly a complicated perl recipie with 2 arrays, 1 scaler and some special matching

Use
$topic =~ s/\b$_\b//g;
and it will not turn class into cl.

The \b's tell Perl you only want the pattern to match at a 'word boundary'.

Hope this helps.

--
Mark Dominus
Perl Paraphernalia

  • Comment on Re: Defenetly a complicated perl recipie with 2 arrays, 1 scaler and some special matching
  • Download Code

Replies are listed 'Best First'.
Re: Re: Defenetly a complicated perl recipie with 2 arrays, 1 scaler and some special matching
by Anonymous Monk on Jul 15, 2001 at 06:35 UTC
    after that port, i noticed some of my words were getting drop kicked. I'll put spaces in it so you can see the word: < c e n s o r e d > thats ALL over the submitted question how much does that change?
      well, i cant type it out at all, its the word censored with pointy brackets on both sides