Multiple Line HTML Printing in CGI

by Hiroshi on 10-10-2007

This is an example of writing multiple lines of text without using print statements in CGI.

#!/usr/bin/perl -wt
print "Content-type: text/html\n\n";
print <<endmarker;
line1
line2
line3
You can write multiple lines of text without using multiple print statements by this,
etc.
endmarker

Download simple CGI print example
Download multiple CGI print example

Related Posts

Share it!
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • PDF
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • Add to favorites
  • Share/Bookmark

10 Responses to “Multiple Line HTML Printing in CGI”

  1. Oct 19, 2007
    Objessecefe Says:

    Hello.
    I need your help

    ReplyReply
  2. Oct 20, 2007
    Hiroshi Says:

    Sure, ask away dear.

    ReplyReply
  3. Oct 25, 2007
    Helga Says:

    Hello! Nice CGI tip.

    ReplyReply
  4. Oct 25, 2007
    lora Says:

    Good site, thanks!

    ReplyReply
  5. Oct 26, 2007
    Bob Says:

    Nice resource, very interesting reading…p

    ReplyReply
  6. Oct 26, 2007
    van Says:

    very helpful, thanks!

    ReplyReply
  7. Oct 27, 2007
    cheng Says:

    Good job, here and there!!

    ReplyReply
  8. Oct 28, 2007
    Hillari Says:

    Good site – you’re a pretty good writer.

    ReplyReply
  9. Oct 30, 2007
    otuyi Says:

    Great helpful tutorial … Good job

    ReplyReply
  10. Oct 31, 2007
    yamomoto Says:

    O, super project.1

    ReplyReply

Post a Comment

Comment will appear here after approval, Thanks for patience