in reply to Counting the number of replaces

Try this. $a = $b=~s/<i>/<italic>/g; print "$a"; Gives the output you need.

Replies are listed 'Best First'.
Re^2: Counting the number of replaces
by monkey_boy (Priest) on Jun 26, 2006 at 09:42 UTC
    I know this is only a quick example, but in general i would avoid using the special variables $a and $b


    This is not a Signature...