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: DBD::Informix -- Error Installing On Mac OSX
    ... And don't install it in the system locations. ... Has anyone successfully built a 64 bit perl on OSX? ... the environment correctly, as long as the module reasonably clearly ... Yes, you need a working Informix environment, including a stores ...
    (comp.databases.informix)
  • Re: PATCH [0/3]: Simplify the kernel build by removing perl.
    ... If we only use 0.5% of a certain language ... Dependencies very quickly become dependency hell. ... - Cross-compiling perl is hard. ... #2 is another byproduct of your environment and generally a non-issue. ...
    (Linux-Kernel)
  • 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)