HP3000-L Archives

February 2001, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Mon, 19 Feb 2001 09:43:15 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
Juan Pineiro wrote:
> Does anyone have or know where I might find a sample Perl or Shell script they can share  which accepts a post from an html FORM and executes the form contents on an MPE web server via CALLCI.

You can do a callci from Perl like this:

        system("callci command parameters");

Everything you always want to know about Perl CGI can be found at:

        http://stein.cshl.org/WWW/software/CGI/

The first example on that page works on MPE.  Just change the first line of the
script to #!/PERL/PUB/perl.

When doing callci from Perl, it's important to realize that traditional MPE
commands and programs will use unbuffered output.  This won't mix well with
Perl's normally buffered output, and so you need to tell Perl to also use
unbuffered output by doing:

        $| = 1;

If you don't do this in CGI applications, your CGI will fail to work properly
under the web server, but will appear to work properly if you execute it
directly from a terminal session.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

ATOM RSS1 RSS2