biohisham has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks, I have been wanting to get a certain module that could enable me to interpret HTML tags and translate them into their respective view with ease in a similar way to the node posting here in PM, but my application would run offline. Searched the CPAN, I found: in addition to the markdown modules suggested to me by a Perl Monk, however, these modules did not seem to offer but an overwhelm of the simple functionality that I want, I have already written this Tk GUI that I need to set its view button active to show a fed-in text after formatting it. This fed-in text itself would contain HTML tags provided by the user, I need a module that would read in this input, and enable viewing it in a browser or in another text area embedded into the interface, all this works offline so no need for CGI intervention. Any Guidance and suggestions would be taken in with gratitude.


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re: Translate HTML Tags
by ww (Archbishop) on Aug 23, 2009 at 16:15 UTC

    The method you're asking for seems like a convoluted way to deal with the problem space you've reported.

    How do you view nodes here?

    With a browser.

    So why not do the same with your challenge?

    • Write your script to accept input (which, I gather, is supposed to be valid html) and to write that to a file (naming could be as simple as \d.html with incrementing of the digits.
    • Expand the script to invoke the browser of your choice on file:///\d.html.
    • View it in the browser.

    Or, is there some constraint you didn't mention or that I missed?

      Thanks for your reply, this is the way I have visualized it, but I was giving a priority to viewing the HTML entered into one text area within the neighboring text area. I am willing to take a dive into whatever material that can be of inspirational-value to me in this regard, because this is like my first project, a personal project that I am willing to share. as long as the experience factor is concerned, I am still new to programming hence I find myself that I have a lot to study and apply with diligence.


      Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.