It appears your reasons are aesthetic, can you elaborate on your reasons?
If preferring not having to read 45 lines of if{} in favor of much fewer then yes it is aesthetic. It just seems that 45 lines of if {} is just unnecessary and redundant. If there are 15 tests and I can see all 15 without having to page down then all the better.
Maybe. The rule of thumb is if it seems slow, or you need to run it often, try to make it faster.
It would take official benchmarking to determine that. It's negligable in real terms IMHO.
:) Can you quantify REALLY and that much ? eval EXPR is parsed and executed as if it were a little Perl program. So instead of parsing/executing one Perl program, you have one plus X many little ones. 1+X is slower than 1 :)
Ah now we're getting to a golden nugget. Seeing that eval EXPR is parsed and executed as if it were a little program and then having that eval to happen 15 times does answer my question to a degree although I believe the answer is going to involve a benchmark every time I want to make the point that using eval is negligable.
I appreciate your input on this.
Sherab
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.