OfficeLinebacker has asked for the wisdom of the Perl Monks concerning the following question:
Is one of these superior to the other, and if so, why? given
which is better?use strict; my $contents = param("$a");
ormy @contents = split( /\n/, $contents ); $contents = join( "<br>", @contents );
?$contents =~ s/\n/<br>/g;
_________________________________________________________________________________
I like computer programming because it's like Legos for the mind.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is one form of character substitution better than the other, and if so, why?
by Fletch (Bishop) on Aug 21, 2006 at 15:28 UTC | |
|
Re: Is one form of character substitution better than the other, and if so, why?
by imp (Priest) on Aug 21, 2006 at 15:37 UTC | |
by OfficeLinebacker (Chaplain) on Aug 21, 2006 at 17:26 UTC | |
by CountZero (Bishop) on Aug 21, 2006 at 20:10 UTC | |
|
Re: Is one form of character substitution better than the other, and if so, why?
by OfficeLinebacker (Chaplain) on Aug 25, 2006 at 14:40 UTC |