#!C:\wherever\Perl.exe open FOO, "C:\wherever\program.exe |"; # The | is a pipe; we're running program.exe and # reading its output from the FOO filehandle: print "Content-type: text/plain\n\n"; while () { print }