japhy,

I have experienced similar situations, needing to process/strip the contents from another web site. In my case it was getting info from an "internal" site to be displayed on an "external" site.

In our case, I also wrote the site being called and reformatted, so I was able to put markers in the source output that I could easily strip with a straightforward regex. I didn't need to get it a line at a time, so I didn't need to re-write any LWP type functionality, so I got off easy.

In another similar case, I used a behind-the-firewall server to produce delimited data from an internal financials database (thus no absolutely access from the 'outside' allowed). Again I used markers to isolate the customer data, then created a page from that. Luckily, it was a single row of data, so I didn't need to process by line ( although I could have split on "yet another set of markers". So while my situation differed a bit from yours, I think you did the right thing...which is you solved a problem in a way that you were able to using your own skills and insight.

I don't think that you should be worried about either doing this or posting that you did this. I suspect your customer (even if it's just your own project, thus you) is looking for end results. And while I don't subscribe to the "end justified the means", I do subscribe to TIMTOWTDI.

thanks for sharing your experience, and posting useful code.


In reply to RE: to post, or not to post... by wardk
in thread to post, or not to post... by japhy

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!
  • 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:
    & &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.