http://www.perlmonks.org?node_id=1052290


in reply to Re: Display contents from html file to a webpage.How?
in thread Display contents from html file to a webpage.How?

Why is this a Perl question? Yes this is. What web server/website software are you using? don't know. Its a company maintained website. Are you working on an existing Perl based site? No. I've a html file stored at at a location, which keeps updating everyday and that needs to be displayed on a webpage. Are you running on the web server an just need to plonk it in htdocs, or do you need to ftp it? Well, i just need the contents of the html file which keeps on updating to be displayed on the webserver address.
  • Comment on Re^2: Display contents from html file to a webpage.How?

Replies are listed 'Best First'.
Re^3: Display contents from html file to a webpage.How?
by marinersk (Priest) on Sep 04, 2013 at 11:40 UTC
    Hello ramki067,

    I hope your day is going well.

    First, please -- have mercy on us old folks. Please take the time to at least use <p> and <br> tags in your post so it doesn't read like one flowing mishmash of words.

    Second, please answer the question actually asked. We can only help you if you actually give us the information we need. For example:

    Q: Why is this a Perl question?
    A: Yes this is.

    You were asked why. You answered what.

    If you won't take the time to read our questions, we presume you also won't read our answers.

    This does not inspire us to take time to give you answers. And it does take time, so please don't dismiss this as unimportant. I've lost three hours this morning hanging out on Perlmonks. And I'm under a deadline at work, suggesting this was perhaps not the best use of my three hours.

    I'll stop now and let you and Corion have a go at this.

    I do you hope you find the answers you need. The Monastary can be an amazingly useful resource.

    Best wishes to you, and I hope you continue to have an excellent day.

    - Steve M.

      Hi all, Extremely sorry for the inconvenience caused to you guys. I shall try my level best to give the complete picture and here it goes.

      1. I've a perl script from which an email is sent to specific people about the results. I've used MIME::Lite for the email. I've now used this MIME::Lite module to store the email into a html file such as xyz.html at a location on the system.
      2. Now, i need to display the already created .html file on a webpage which is almost like the below example:
       http:www.xyz.com/pages/editpage?123456
      3. I've googled for a solution for this the entire week but didn't find any concrete solution. Thereby, please provide me some pointers or any help on how to go about this would be of great help.



      Thanks a lot in advance.

      Regards,
      Ramki
        ramki067,

        Continued wishes for a good day to you.

        We're getting closer.

        So your Perl script creates the HTML file and puts it someplace on the server. Excellent.

        Your next step is to display that file on a web page.

        I need a little bit more information so I can translate that into something I understand; these questions should help:

        1. What causes the Perl script to be run?
          • Is it like a CGI script that runs when a user hits a web page?
          • Is it run from a local computer but on an unscheduled, ad hoc basis?
          • Does it run on a schedule from some kind of cron or similar tool?
        2. Where does the HTML file need to end up?
          • Does it need to be moved from this server to another one?
          • Does it need to be copied to some other location on the server where the script ran?
          • Does it need to be displayed to the current user (sort of like a CGI response)?
        3. If the file is being posted to a different server, how would you get it there by hand?
          • NFS file copy?
          • Samba Share file copy?
          • FTP? SFTP?
          • HTTP POST?

        Here's hoping that next round of messages we will start diving toward a solution.

        Best Regards,
        - Steve M.

Re^3: Display contents from html file to a webpage.How?
by Corion (Patriarch) on Sep 04, 2013 at 11:20 UTC

    Maybe you want to download a web page and display it on your machine? See WWW::Mechanize that emulates a web browser, except in Perl.

    Otherwise, your question is still very unclear. Please describe what steps a human would need to take to produce the result you want.