Generally what
makes a small task is the use of a pre-written module to do it. Consider
LWP::Simple and
get as a fine example.
If you're interested in figuring out how to do a certain task for which a module already exists, I still recommend the module, because with the module you can always look at the code and see how it's done. :)
But I agree that in some cases the robustness of a module to do the job of parsing out one little tidbit of text might not be necessary, in cases where you can guarantee the input and a one-line index or regex would do the job. In that case, go for it. But if your input ever strays in the future, and you find yourself trying for hours to nail down the bug in your script, you may wish you had used the module in the first place when you finally do discover the problem.
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.