Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: calling external program from CGI

by ikegami (Patriarch)
on May 07, 2009 at 09:59 UTC ( [id://762549]=note: print w/replies, xml ) Need Help??


in reply to calling external program from CGI

Seriously? test_process.pl is not a Perl function, and \"$myQuery\" isn't even close to valid Perl either.

my $output = `command`;

Replies are listed 'Best First'.
Re^2: calling external program from CGI
by stan131 (Acolyte) on May 07, 2009 at 10:16 UTC
    Ikegami,
    I am newbie to CGI and still not able to what am I doing wrong. I have a perl program that takes parameter and generates an array. Now I need to call this program from my .cgi file and retrieve the array. Since program cannot return(only subroutines can), how do I invoke this from CGI and fetch the array.
      Processes communicate via file handles, and file handles can only transmit bytes (not Perl arrays). You need to serialize the array somehow. I thought you already addressed that issue using Storable?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://762549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-20 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found