Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-19 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found