in reply to Re: Printing with CGI.pm
in thread Printing with CGI.pm

Thanks,
When I move the print header(); outside of the loop I loose all the HTML formatting. I just get the data from the text file. Is there a particular way to do this?
Cal

Replies are listed 'Best First'.
Re: Re: Re: Printing with CGI.pm
by mephit (Scribe) on Jul 21, 2002 at 04:07 UTC
    In your original code, you have one long print statement. When you moved the print header() outside of the loop, did you forget to leave a print statement inside the loop? You may want to move the start_html() out of the loop, as well. Some other thoughts:
    • As your code is right now, it looks like you'll get each line in a separate table. Is that What You Want?
    • Your code might look better if you were to use CGI.pm's table functions (table, td, Tr, etc.), which you already have imported by using :standard. I refer to Lincoln Stein's Official Guide to Programming wth CGI.pm. I'm sure there are online resources for this; I've just never looked.
    HTH

    --

    There are 10 kinds of people -- those that understand binary, and those that don't.