Home: Perl Programming Help: Win32 Programming Help:
dos command via perl



tps
Deleted

Jan 30, 2001, 6:45 AM


Views: 6192
dos command via perl

I have a perl script that call a .cmd file that contains dos commands ( specially xcopy command).
Through IE5 it works perfectly, but with Netscape,
when the command dos are executed, a pop up window appears asking me to save my perl script...
In anyways, the dos commands were executed.
But how can i get rid of this window ???






localfilmmaker
stranger

May 8, 2001, 10:51 AM


Views: 6150
Re: dos command via perl

It sounds like you're not sending the Content-type MIME header at the beginning of your cgi script. IE might be assuming 'text/html' when no type is specified, where Netscape might default to saving the file when no MIME type is specified.
In any case, make sure that you have this line before any other print statements:

Code
print "Content-type: text/html\n\n";

Or if you are using the CGI module, do this:

Code
my $query = new CGI; 
print $query->header;

-localfilmmaker
Spencer Christensen
spencer@mecworks.com