in reply to What is clear code ?
Cosmetic mostly, but since this is about clarity. The chomp call seems kind of strange since it takes off $/, which is OS specific, right? Better to just say what you mean, I would think.sub Clear_MakePtag { return join ("\r\n", map { "<p>$_</p>" } grep { /\S/ } split ("\r\n", my ($fix) = @_) ); } sub MakePtag { my ($fix) = @_; $fix =~ s!\r\n$!!s; $fix =~ s!\r\n!</p>\r\n<p>!g; return "<p>$fixme</p>"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What is clear code ?
by mandog (Curate) on Apr 29, 2002 at 03:14 UTC | |
by abstracts (Hermit) on Apr 29, 2002 at 03:21 UTC |