Answer the question
In order to leave comments, you need to log in
How is it appropriate for a Perl script called from some program to interact with another (called by it) program (or with a script in general)?
There is a popular cross-platform C program (this program is HPT , if you're interested; but that's not essential), which long ago included the ability to call external Perl scripts ( in that unofficial build on Google Sites, for example).
A typical Perl routine receives a set of preset variables from this program and returns a set of parameters. A good example is a filter:
sub filter
{
# predefined variables:
# $fromname, $fromaddr, $toname,
# $toaddr (for netmail),
# $area (for echomail),
# $subject, $text, $pktfrom, $date, $attr
# $secure (defined if message from secure link)
# return "" or reason for moving to badArea
# set $kill for kill the message (not move to badarea)
# set $change to update $text, $subject, $fromaddr, $toaddr,
# $fromname, $toname, $attr, $date
return "";
}
Answer the question
In order to leave comments, you need to log in
if from C, then I would look towards perlxs
as options for pipes (IO:: Pipe) and, for example, XML:: RPC
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question