HP3000-L Archives

August 2002, Week 4

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:
Greg Skvorak <[log in to unmask]>
Reply To:
Greg Skvorak <[log in to unmask]>
Date:
Wed, 28 Aug 2002 14:41:53 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (85 lines)
----- Original Message -----
From: "John Korb" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, August 28, 2002 1:18 PM
Subject: Perl Question


> I know very little about Perl, and I'm trying to use Perl to parse the
> NAME=VALUE pairs from a POST form and then pass some environment variables
> and the VALUE strings (in a specific order) to an MPE program through the
> MPE program's INFO= parameter (not much data).  To do so I need to know
how
> to tell Perl to execute the MPE program with an INFO= string specified,
and
> I can't seem to find a reference that describes how to run a program from
> Perl (but I can find many references on calling Perl from C).  I have the
> Perl code for parsing the NAME=VALUE pairs and it works.
>
> Also, perhaps I'm going about this the wrong way.  If there is an easier
> (non-Perl?) way of doing this, please let me know.
>
> Thanks!
>
> John

John,
This example is adapted straight from page 230 for 'system' of the "Camel"
book (Programming Perl, Second Edition - O'Reilly, Larry Wall, Tom
Christiansen & Randy L Schwartz).
I recommend the book if you are serious about *ANY* Perl programming.

/ACCT/SOURCE>cat perlrun
#!/usr/local/bin/perl

@args = ("callci","showme");
system(@args) == 0
  or die "system @args failed: $?\n";

@args = ("callci","nettool.net.sys","'res;di;q'");
system(@args) == 0
  or die "system @args failed: $?\n";

/ACCT/SOURCE>./perlrun
USER: #S253,GREG.SKVORAK,PUB       (IN PROGRAM)
RELEASE: C.60.00   MPE/iX HP31900 C.16.01   USER VERSION: C.60.01
CURRENT: WED, AUG 28, 2002,  2:32 PM
LOGON:   WED, AUG 28, 2002,  1:12 PM
CPU SECONDS: 1         CONNECT MINUTES: 80
$STDIN LDEV: 11         $STDLIST LDEV: 11
NETTOOL Version:      B06000B0

 Enter HELP HELP for an explanation of the help facility.

 Enter HELP OPERATION for guidance on NETTOOL use.

 Commands can be abbreviated, HELP keywords cannot.

 Menu-specific commands for the ROOT:

>>>res
>>>di
WED, AUG 28, 2002,  2:32:57 PM
 Item  Subsystem   Name   G/N  Description      Used   High    Max
____________________________________________________________________

  1    NS XPORT  CP_POOL_ (G)  Control Buf Pool    0      1    300 :)
  2    NS XPORT  1536____ (G)  Inbound Buf Pool   32     56    341 :)
  3    NS XPORT  LAN1____ (N)  Outbnd  Buf Pool    0     21    512 :)
  4    NS XPORT  LOOP____ (N)  Outbnd  Buf Pool    0      0    512 :)
  5    NS XPORT  UDP      (G)  GProt  Msg  Pool   50    N/A    512 :)
  6    NS XPORT  PXP      (G)  GProt  Msg  Pool    1    N/A    660 :)
  7    NS XPORT  PROBE    (G)  CM Prot Msg Pool    1    N/A    678 :)
  8    NS XPORT  IP_NI    (G)  IP-NI  Msg  Pool   50    N/A   2048 :)
  9    NS XPORT  IP_NI    (G)  IP-NI  Msg  Pool   50    N/A   2048 :)
 10    NS XPORT           (G)  Node  Name Cache    0     29    360 :)
 11    NS XPORT           (G)      1     52   2048 :)
>>>q

Regards,
Greg Skvorak
Beechglen Development, Inc.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2