Non-Parsed Header Scripts
 print "Content-type: text/plain\n\n";we count on the fact that the server that executes the script will fill in the rest of the HTTP protocol lines, such as the "200 OK" status codes, the date and time, and other information defined in the protocol. 
 
 !/usr/local/bin/perl
print "$ENV{'SERVER_PROTOCOL'} 200 OK\n";
print "Server: $ENV{'SERVER_SOFTWARE'}\n";
print "Content-type: text/plain\n\n";
$| = 1;
for ($loop = 10; $loop >= 0; $loop--)
  {
  print "$loop\n";
  sleep (1);
  }
print "Blast Off!\n";
exit (0);
#!/usr/local/bin/perl
$| = 1;
print "$ENV{'SERVER_PROTOCOL'} 200 OK\n";
print "Server: $ENV{'SERVER_SOFTWARE'}\n";
print "Content-type: 
multipart/x-mixed-replace;
boundary=ARandomString\n\n";
                # Begin sending words
print "--ARandomString\n";
 
    # Create a list of words that you 
    # want to be animated.
 
@words = ("This", "is", "a", "test");
 
    # Set $loop equal to zero (since all 
    # arrays start with 0 as their first
    # value).  Then begin incrementing 
    # $loop by one ($loop++) until $loop is
    # equivalent to the number of words in 
    # @words ($loop <= @words;)
for ($loop = 0; $loop <= @words; $loop++)
    {
    # For every value of $loop, print out 
    # the value in @words that corresponds
    # to the value of loop.  So when $loop 
    # equals zero, print out the first
    # word in the @words array and when 
    # $loop equals 1, print out the second
    # word...and so on.  Then pause a second 
    # and print out the flag which will notify 
    # the browser to replace the next word 
    # with the current one.
  print "Content-type: text/plain\n\n";
  print "$words[$loop]\n";
  sleep (1);
  print "\n--ARandomString\n";
  }
                # Quit-a-mundo
    exit (0);
Additional Resources:Table of Contents Handling Image Input  | 
| 
		Hosted by Graphics & Media Lab
	 http://graphics.cs.msu.su  | 
 | 
mailto: Laboratory |