Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How do I reverse an extracted HTML table?

by sundialsvc4 (Abbot)
on Dec 06, 2011 at 13:27 UTC ( [id://942018]=note: print w/replies, xml ) Need Help??


in reply to How do I reverse an extracted HTML table?

A generalized solution might benefit from using a templating system, such as the ubiquitous Template::Toolkit, to actually do the grunt-work of generating the output HTML once you have “flipped” the data structure.

Or, perhaps you don’t have to actually flip the thing, because a template can grab data from a function just as easily as it can get it from a variable.   So you could write a tiny function f(x,y) that returned element (y,x) ...

A template can be trivially changed, as often as (the customer | your boss | the marketing department) wants to change it.   The “magic” comes from the (already in place ...) HTML parser and, maybe, just a handful of clever functions that a template can call.   The issue that is most likely to be (constantly) changed, namely, “tweaking the output,” has been factored-out such that it contributes little or nothing to code complexity and ongoing maintenance.

Replies are listed 'Best First'.
Re^2: How do I reverse an extracted HTML table?
by Anonymous Monk on Dec 07, 2011 at 03:36 UTC

    WOW, just WOW

    LOL

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://942018]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found