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

Hi,

I have a 2 part question.

First part:

I am running a script, which works, but I want to display a web page that has already been created. I just don't know how to do it.

Second part:

This may be tricky, Once I get the page up, I want the user to be able to print, I know print, but in order for it to be printed the way my boss wants, there has to be no margins set. It is just to big to print normally

Can this be done in Perl, or do I need to look in to Javascripting?

Any help would be appreciated.

Joseph A. Ruffino
Automated Systems Assistant
Gail Borden Public Library District
270 N. Grove Ave
Elgin, Il, 60120

Replies are listed 'Best First'.
Re: Web Page Redirect
by matija (Priest) on Apr 27, 2004 at 19:37 UTC
    You want to display a webpage when the interaction with the script is finished?
    use CGI; print redirect("http://destination.url");

    Or do you want to display the page, but with some values from the script? Use a templating system, for instance HTML::Template.

      Yes, I just want to display the pre-written webpage.

      Joseph A. Ruffino
      Automated Systems Assistant
      Gail Borden Public Library District
      270 N. Grove Ave
      Elgin, Il, 60120
        Well, if you are just wanting to display a page, you can either do a re-direct (as has already been shown) or you can read and print the existing page through your script. From a performance standpoint the re-direct is going to be much better for you.

        As for the margins question, the print format is as far as I know pretty much entirely up to the browser in question. If you need that much control over how it renders, you might consider putting it into pdf format (for which there are a number of modules in CPAN).
Re: Web Page Redirect
by Joost (Canon) on Apr 27, 2004 at 21:49 UTC