Well, after looking around, the regexp is my preferred method. I ended up doing this:
I suppose you can imagine by now what this is for!my $contents = param("$a"); $contents =~ s/(\n|\r)/<br>/g; $contents =~ s/(<br>)+/<br>/g;
Thanks again!
Terrence
_________________________________________________________________________________
I like computer programming because it's like Legos for the mind.
In reply to Re: Is one form of character substitution better than the other, and if so, why?
by OfficeLinebacker
in thread Is one form of character substitution better than the other, and if so, why?
by OfficeLinebacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |