#!/usr/bin/perl # This is a bare-bones perl CGI script. # It is set up to run as a user-initiated URL. # The above line invokes the Perl interpreter. # The statements below set up for HTTP server execution. # Use $nl instead of \n. Always put it inside the quotes. $nl = "\r\n"; print "HTTP/1.0 200 OK$nl"; # This line is the MIME type and is really important; it MUST be # correct to the letter. for server-push, it will always be # multipart/[subtype] print "Content-Type: multipart/alternative; boundary=boundary42"; # code goes here # this is the header that describes what you are sending and is REQUIRED print "$nl--boundary42$nl"; print "Content-Type: text/plain$nl$nl"; # here is the data we'll send... print "This will be sooooo sweeet if this works:$nl"; print "Hello, world!$nl"; # apparently, it worked even this line doesn't get output. # I don't know why. :D # print "$nl--boundary42--$nl"; exit 0;