Displaying output of command line over HTTP in real time

James Davis jamesd at jml.net
Mon Dec 19 15:51:12 GMT 2005

Joel Bernstein wrote:

> Does that give you enough information to work from?

I've got a rough idea of what needs to be done but it's not working. As
a test I wrote

local $| = 1;
use CGI qw(:standard);

my $BOUNDARY = "ARandomStringWhichWontOccurInYourContent";
print header(
        -nph     => 1,
        -pragma  => "no-cache",
        -expires => '+0d',
        -type    => "multipart/x-mixed-replace;boundary=$BOUNDARY"
print start_html("Hello");
print "Hello ";
print "\n--$BOUNDARY\n";
print "World";

But all I'm getting from that is a blank page, any ideas?


http://www.freecharity.org.uk/ - Free hosting for charities

More information about the london.pm mailing list