moggs has asked for the wisdom of the Perl Monks concerning the following question:
Now here's a really easy question (it's even multiple choice):
When using perl to create the HTML I commonly use lines like
print qq~<ul> <li>blurb 1</li> <li>blurb 2</li> </ul>\n~;
However, I've recently found myself writing it differently
print qq~<ul>\n~; print qq~<li>blurb 1</li>\n~; print qq~<li>blurb 2</li>\n~; print qq~</ul>\n~;
The output is the same, but the source code is so much neater. So my question is: Does this effect PERL's efficiency in any negative form?
Thanks for your assistance on this trivial point
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: print qq once or many times
by BrowserUk (Patriarch) on Dec 14, 2010 at 01:28 UTC | |
|
Re: print qq once or many times
by GrandFather (Saint) on Dec 14, 2010 at 01:25 UTC | |
|
Re: print qq once or many times
by Anonymous Monk on Dec 14, 2010 at 01:08 UTC | |
|
Re: print qq once or many times
by moggs (Sexton) on Dec 17, 2010 at 00:26 UTC | |
by Anonymous Monk on Dec 17, 2010 at 00:36 UTC |