Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Not for me; I don't know how to write an xpath expression.
...
I wonder what value you see in enhancing the features of a program that already has way more features than have ever been used.

Fair enough ... but I suspect if you knew XPath my comment would make more sense.

you strike me as the kind of guy who whips up little scripts to solve problems a lot -- heck, anyone who uses perl on a regular becomes thta kind of person if they weren't already. as you say: right now it's got a feature you've never used (the ability to pick an arbitrary tag name at run time) and if you never use the script again oh well ... it's not like it took you a lot of work to code it right? But if at some point in your life you think "i need to get the <h1> tags out of all these HTML pages", you might remember your handy script use it, and then realize what you really want is the *first* <h1> out of all the files, and you'd probably add a quick option to let you pick the first instance. Then maybe 6 months later you're crunching some more HTML files and you want the "content" attribute of any <meta http-equiv="refresh" ... > tags ... so you crank out another little script.

Or, if you know XPath, the first time you need a something a little more complicated then just all values of all the tags with a certain name, you add about 12 characters to your current script, and start passing some simple XPath expressions on the command line.

Or you don't.

Like you say: it's a trivial utility ... if it does everything you want then call it a day and go fishing. To answer your specific question: The value I see in enhancing it comes from the ability to gain large amount of additional functionality from a small amount of additional work.


In reply to Re^3: Trivial HTML extractor utility by hossman
in thread Trivial HTML extractor utility by Dominus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (5)
    As of 2014-08-02 05:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Who would be the most fun to work for?















      Results (55 votes), past polls