A CGI Script that Creates Plain Text

Print the magic HTTP header Content-type: text/plain\n\n, and then whatever you want to see on the page.

Code:


  #!/usr/bin/perl
  # file: plaintext.pl

  print "Content-type: text/plain\n\n";
  
  print "When that Aprill with his shoures soote\n";
  print "The droghte of March hath perced to the roote,\n";
  print "And bathed every veyne in swich licour\n";
  print "Of which vertu engendered is the flour...\n";

http://your.site/cgi-bin/plaintext.pl


<< Previous
Contents >> Next >>

Lincoln D. Stein, lstein@cshl.org
Cold Spring Harbor Laboratory
Last modified: Fri Oct 22 14:37:27 EDT 1999