TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [TCLUG:14854] Perl CGI and open2
> Anyone know why I'm getting two Content-type lines when I run the
> following perl CGI? It should display a blank page.
>
> #!/usr/bin/perl
> use IPC::Open2;
> print "Content-type: text/html\n\n";
> open2(IN, OUT, "/usr/bin/ispell");
>
> (You will see the second "Content-type: text/html" line, since the first
> one is used to establish the content type.)
>
> It has something to do with open2, because if you comment it out it does
> what it's suppose to do.
I've never used that module but, does it call CGI.pm? CGI.pm automatically
spits out the "Content-type" line on "new". Can't you just lose the "print"
line?