: i can implement system(), but no data return 
Author Message
 : i can implement system(), but no data return

i'm a recent lurker to these groups, so i may have missed this info...

i am trying to implement system() in MacPerl.  (<BOLD>HA!</BOLD>)

i have MacPerl(4.1.8) and MacHTTP(2.2)

MacPerl doesn't do system() (duh!)
MacHTTP doesn't do Server-Side Includes (SSI)(*1) (more why later)

the way i am able to "sort-of" do a system() call is as follows:

$thePath = "HD:AFolder:AProgram.pl.exe";
$theAppleScript = <<END_SCRIPT;
tell application "$thePath"
    -- do i need to add more here
    -- can i do something with scrap? (the clipboard)
    -- i'd prefer not to have a window opened
    -- i'd also like to have it Quit when done
end tell
$ASRet = &MacPerl'DoAppleScript($theAppleScript);
$Status = $?;

i've tried having AProgram.pl.exe end with each of:
    print "123rd\n";
none of which work, because always $ASRet is "tell" and $Status is 0,
but AProgram.pl.exe does indeed run.

i somehow need to get actual data returned from AProgram.pl.exe.

now, in the MacPerl.Specifics file, there is also a reference to:
which says that it replies to current DoScript request. it is listed right
after &MacPerl'DoAppleScript(SCRIPT), so in this context does DoScript mean

well, advTHANKSance for any help you can give me!

---------------- fyi here is what i am trying to implement ----------------
(later...) here's the scenario i am using:

i am able to implement SSI (sort-of) by having any pages that need SSI to
really just be a generic perl cgi. this generic script is always the same
except for the file that it reads in and writes out verbatim. the only time
it doesn't copy the input verbatim is if it sees data in the SSI format.
(currently, an SSI must be entirely on one line, but more than one is ok.)

i'm able do an <!-- #INCLUDE FILE="SomeFile" --> and i'm able to sort-of do
an <!-- #EXEC CMD="SomeProgram" -->. the reason i say sort-of, is because
even though SomeProgram runs, i can't figure out how to get data from it.

the sequence followed is as follows:
ParseSSI.pl.cgi is running on my Home.html.
its reading in lines and writing them out.
it gets to the following lines:
    You are the
    <!-- #EXEC CMD=".../SomePath/AccessCountProgram" -->
    person to access this page.
and i expect to see (on my browser) something like:
You are the 123rd person to access this page.
*1  Server-Side Includes - SSI:
    (AKA: Server Includes; Server-Side Document Includes):
    HTML data in the form: <!-- #command arg1="value"...-->
    some of the commands are: INCLUDE and EXEC

the guy formerly known as mike, who is now known as the symbol
which looks like the word mike, but really isn't the word mike.
(the pronunciation of which is almost, but not quite, exactly
like the pronunciation of the word mike.  but different.)
but you can call me: the symbol which looks like the word mike.

Mon, 24 Nov 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. : i can implement system(), but no data return

2. Getting System call return data

3. Problem using LWP::UserAgent (server returns 501 not implemented error)

4. RDB, a Relational Database Management System implemented in PERL

5. canned reply??

6. canned reply script

7. Troubles with a Canned script

8. parsing canned response

9. question about canned perl script

10. canned replies

11. system() return value affected by stderr redirect?

12. system() return code --NEVER MIND...


Powered by phpBB® Forum Software