in reply to Is one form of character substitution better than the other, and if so, why?

Greetings, esteemed monks!

Well, after looking around, the regexp is my preferred method. I ended up doing this:

my $contents = param("$a"); $contents =~ s/(\n|\r)/<br>/g; $contents =~ s/(<br>)+/<br>/g;
I suppose you can imagine by now what this is for!

Thanks again!

Terrence

_________________________________________________________________________________

I like computer programming because it's like Legos for the mind.

  • Comment on Re: Is one form of character substitution better than the other, and if so, why?
  • Download Code