returning file info to C code



Hello, I am a C coder but new to Perl. I am running in an AIX
environment. I was wondering if there was a Perl way to return string
data (or larger int values) to a C program? For instance, if I use
the command :

ps aux | grep process123 my out put would look like this:

emextra 45304 0.0 0.0 7344 6120 - A 20:08:01 0:00
process123
emextra 97034 0.0 0.0 3184 1984 - A 20:11:25 0:00
process123
emextra 123294 0.1 0.0 5100 3580 - A 20:06:47 0:37
process123
emextra 186828 0.0 0.0 2328 912 - A 20:07:22 0:02
db2agent (ERMM)
rsuser 8448 0.0 0.0 2900 284 - A 20:13:24 0:00
process123
rsuser 11576 0.0 0.0 2492 312 - A 20:13:24 0:00
process123
rsuser 14110 0.0 0.0 1576 288 - A 20:13:24 0:00
process123
rsuser 23584 0.0 0.0 2120 324 - A 20:13:24 0:00
process123
rsuser 24108 0.0 0.0 2540 280 - A 20:13:24 0:00
process123
rsuser 26800 0.0 0.0 1468 356 - A 20:13:24 0:00
process123

I want to retrieve the 2nd and 5th columns of the output. I *think* I
can figure out a way for Perl to get these columns but is there a way
to return these values to my C program?

Any advise would be appreciated

.



Relevant Pages

  • Re: AGAIN: how can I install modules if Im not root?
    ... an environment variable for setting @INC which behaves as -Mlib ... during Perl configure. ... [Oh - and I never install manpages. ... OK - that situation mya not obtain in the environment you are thinking of, but it *can* obtain - *did* ...
    (comp.lang.perl.moderated)
  • Re: How to manipulate environment variables in parent process?
    ... Normally, you can manipulate environment variables, but they only have ... I have a windows bat file and everyday I have to edit it to contain the ... Can perl help? ... Alternatively, you could use exec(). ...
    (perl.beginners)
  • Re: AGAIN: how can I install modules if Im not root?
    ... environment as both cause problems when values set for one case end up being ... claim that environment variables are bad, ... *global* variable you have just screwed up any other perl on the system. ... Likewise on make and make install command ...
    (comp.lang.perl.moderated)
  • RE: how to install perl
    ... Ned Cunningham wrote: ... probably don't have your Perl install path in your system's PATH ... click the Environment Variables button. ... In the system variables, ...
    (perl.beginners)
  • OT - but help here anyway -- was Re: /usr/bin/ls: 0403-027 The parameter list is too
    ... limits - others do not, and yours appears to be one of the latter. ... Which shell do you use personally? ... Do you have a very large environment. ... (Perl can do it; ...
    (perl.dbi.users)