Acorn Arcade forums: Programming: Calling Perl from Basic
|
Calling Perl from Basic |
|
richcheng (13:26 13/4/2005) monkeyson2 (14:19 13/4/2005) richcheng (08:09 14/4/2005)
|
|
richard cheng |
Message #64249, posted by richcheng at 13:26, 13/4/2005 |
Posts: 655
|
I have a Basic program that contains a line along the lines of:
10 OSCLI "perl <Markdown> <infile>"
where <markdown> is the path to a perl script, and <infile> is the path to a file processed by the Markdown script.
When run in a task window from the basic intepreter invoked by '*basic ', the program gets as far as this line, which executes correctly, but the subsequent line is never executed, the program ceases, and I am presented with a star prompt - not Basic's > prompt.
Similarly, when the line is called from a WebJames Baisc cgi script, it kills execution of the script.
So my questions are twofold:- Am I doing something blatently stupidly wrong, here?
- If not, is there a workaround, short of learning perl and rewriting my cgi-script in that language?
|
|
[ Log in to reply ] |
|
Phil Mellor |
Message #64252, posted by monkeyson2 at 14:19, 13/4/2005, in reply to message #64249 |
Please don't let them make me be a monkey butler
Posts: 12380
|
It's because you're executing a new program (rather than a module *command).
For what you want to do, I believe you have to use Wimp_StartTask, which can only be done as part of a Wimp application.
SYS "Wimp_Initialise", blah-i-can't-remember SYS "Wimp_StartTask", "perl <Markdown> <infile>" SYS "Wimp_Closedown", blah-i-can't-remember |
|
[ Log in to reply ] |
|
richard cheng |
Message #64263, posted by richcheng at 08:09, 14/4/2005, in reply to message #64252 |
Posts: 655
|
Aha!
Cool. Muchos gracias. |
|
[ Log in to reply ] |
|
|
Acorn Arcade forums: Programming: Calling Perl from Basic |