View previous topic :: View next topic |
Author |
Message |
btpoole -
Joined: 02 Dec 2013 Posts: 4 Location: United States
|
Posted: Wed Dec 11, 2013 3:31 am Post subject: CGI SCRIPT |
|
|
Can somebody help me with the following cgi script. The script needs to run a batch file that is stored on same computer as Abyss. The script is called from a BrightScript file.
Error I get in the log.
[Tue Dec 10 21:09:30 2013] conversion.pl: syntax error at conversion.pl line 12, near "http:"
[Tue Dec 10 21:09:30 2013] env.pl: Execution of env.pl aborted due to compilation errors.
CGI Script:
#!C:/Perl/bin/perl.exe
use strict;
use warnings;
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
my $cgi=new CGI;
print $cgi->header();
my $cmd= 'http://localhost:8000/conversion.bat'
First and foremost please understand I know very little about cgi and perl, so if I have done something really stupid please point it out.
There will be no html page created or form. The Brightscript calls the cgi script to run which in turn runs the bat file. The bat file will run a conversion program to convert one type of video to another. Once the bat file starts, the Brightscript takes back over. So the only thing I need the cgi to do is start the bat file. Would like to also pass a variable value to the cgi script so I can use the same cgi script for different files but that will come only after I get the bat file to start. I have read alot lately on cgi scripts but I just can't get it. Any help greatly appreciated.
[/code] |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Fri Dec 13, 2013 9:47 pm Post subject: Re: CGI SCRIPT |
|
|
btpoole wrote: | syntax error at conversion.pl line 12, near "http:" |
That's a self-explaining message. Basically, Perl is complaining because you have a syntax error.
Perl is a complex language with a very special syntax. If you want to learn it, you'll have to spend some time until you get the syntax and start writing your own scripts.
If you don't need Perl for a specific reason, we strongly suggest PHP which is easier and with a more direct syntax. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
btpoole -
Joined: 02 Dec 2013 Posts: 4 Location: United States
|
Posted: Fri Dec 13, 2013 9:59 pm Post subject: |
|
|
Thank you for the direction. I will look into php. |
|
Back to top |
|
|
|