I think that the variety of solutions offered to any given question is one of the things that makes this place so valuable.
If you need the quick fix, someone will usually provide it.
If you need the long-term, architected solution, you'll usually get that too.
Only the OP can ever really know what their requirement is, or make a decision about which is applicable to them.
If you read all the replies, you'll usually get a good cross section of possible approached, along with the caveats and benefits.
And there is a golfed-down, or one-liner there too, it may cause you to look closely and work out how it works. Even though you may not use it for that particular problem, something in it may be the trigger to solving some other problem in the future.
Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.
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.