Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: C vs perlby Ovid (Cardinal) |
on Apr 28, 2002 at 06:16 UTC ( [id://162623]=note: print w/replies, xml ) | Need Help?? |
Well, I can't comment on the C code, but I think you can make the Perl a bit clearer (or at least more correct). The following assumes that you want each <p>...</p> section on a new line. If not, the final join should be on an empty string.
Of course, I'd be shot for suggesting:
If you stick with your solution, you'll want to chomp $fixme to avoid wasted tags on the end. Oh, and you had the slash on the trailing paragraph tag backwards :)
Interesting question: what hoops would you have to just through with C to duplicate the grep functionality that I tossed in? Cheers, Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In Section
Seekers of Perl Wisdom
|
|