[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-web
Subject:    Run DOS-based program from WWW
From:       Kyoung Jae Lim <kjlim () ecn ! purdue ! edu>
Date:       2000-11-30 17:37:24
[Download RAW message or body]


Hello.

Could you please help me out ?
I am trying to run DOS-based program from CGI.
This program is kind of interactive program.
So user needs to enter some information.

If user select 1st option then it will clear the screen
and display other list for the 1stoption.

So, I want user to enter those information in html form and
CGI takes all info to run this DOS-based program.

I usesd system command to run that DOS-based program
and used to print "\n" for the "carridge return".
But it just print new line on the web page.


Could you please take my code and tell me how I can fix this problem ?

KJ



-=-=-=-=-=

#!c:\perl\bin\perl

print "Content-Type: text/html\n\n";

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
        foreach $pair (@pairs) {
                ($name, $value) = split(/=/, $pair);
                $value =~ tr/+/ /;
                $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
                $in{$name} = $value;
                }



$filename= $in{'filename'} ;

system("/DOSPROGRAM/TEST.exe") ;

print "\n" ;
print "12\n" ;
print "4259\n" ;
print "n\n" ;
print "3\n" ;
print "1900\n" ;
print "50\n" ;
print "$filename\n" ;
print "n\n" ;

-=-=

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic