Include Header and Footer to Print From Perl?

Discussion in 'Perl' started by Al Franz, Apr 2, 2006.

  1. Al Franz

    Al Franz Guest

    Editing a script that has a "sub printheader" and "sub printfooter" routine
    before and after it creates a web page with a message. I would like to
    customize this script so that I can have my own header and footer. What is
    the best way to do this?

    1. Can you create a "sub" that references a separate file to print as a
    header and footer?
    2. Can you include the html code in the perl script without having to
    include a "\" prior to every quote?

    Thanks!
    Al Franz, Apr 2, 2006
    #1
    1. Advertising

  2. Al Franz

    Joe Smith Guest

    Al Franz wrote:

    > 2. Can you include the html code in the perl script without having to
    > include a "\" prior to every quote?


    Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
    here-doc in particular.

    http://perldoc.perl.org/perlop.html
    Joe Smith, Apr 3, 2006
    #2
    1. Advertising

  3. Al Franz

    Al Franz Guest

    Having Perl print the contents of another file containing the header and
    footer information is not a possibility though? I need to put the HTML code
    within the Perl script?

    "Joe Smith" <> wrote in message
    news:...
    > Al Franz wrote:
    >
    >> 2. Can you include the html code in the perl script without having to
    >> include a "\" prior to every quote?

    >
    > Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
    > here-doc in particular.
    >
    > http://perldoc.perl.org/perlop.html
    Al Franz, Apr 3, 2006
    #3
  4. Al Franz wrote:
    > Having Perl print the contents of another file containing the header
    > and footer information is not a possibility though? I need to put
    > the HTML code within the Perl script?


    See
    perldoc -f open

    jue
    Jürgen Exner, Apr 3, 2006
    #4
  5. Al Franz

    Joe Smith Guest

    Al Franz wrote:
    > Having Perl print the contents of another file containing the header and
    > footer information is not a possibility though?


    I never said that. I did not bother answering that part since the answer
    is so obvious. Perl was created to create reports - reading in multiple
    files, analyzing them, and printing the results.

    >>> 2. Can you include the html code in the perl script without having to
    >>> include a "\" prior to every quote?

    >> Yes. Look for "Quote-like Operators" in `perldoc perlop`. qq{} and
    >> here-doc in particular.
    >>
    >> http://perldoc.perl.org/perlop.html


    Question: Have you ever used the "here-doc" feature? It is very
    useful, and I recommend you try it.

    -Joe
    Joe Smith, Apr 4, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jurjen de Groot

    Print webpage without default IE header/footer

    Jurjen de Groot, Jan 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,356
    Jurjen de Groot
    Jan 20, 2004
  2. ashj
    Replies:
    0
    Views:
    2,769
  3. Dave
    Replies:
    3
    Views:
    16,110
    =?Utf-8?B?ZW11?=
    Mar 18, 2005
  4. Gabriel Lozano-Morán
    Replies:
    2
    Views:
    4,798
    Sam Nkosi
    Aug 5, 2005
  5. Henrik
    Replies:
    1
    Views:
    416
    Ken Cox [Microsoft MVP]
    Jul 6, 2006
Loading...

Share This Page