in reply to get name of process with pid

my $cmd = `ps -hp $PID -o %c`;
But check the manual page of your systems ps. Different OSses have different psses using different command line switches.
Perl --((8:>*

Replies are listed 'Best First'.
Re^2: get name of process with pid
by lorn (Monk) on Nov 18, 2005 at 16:42 UTC

    Sorry people, the O.S is windows :/

    Lorn

    -www.slackwarezine.com.br-

      Looks like you might need Win32::Process::List then.

      --
      <http://dave.org.uk>

      "The first rule of Perl club is you do not talk about Perl club."
      -- Chip Salzenberg

        i search in ppm for Win32::Process::List ths result is:

        U:\>ppm search Win32-Process

        Searching in Active Repositories

        1. Win32-Process-Info 1.006 Get information on arbitrary processes in Wi

        2. Win32-Process-Info 1.006 Get information on arbitrary processes in Wi

        3. Win32-Process-Memory 0.20 read and write memory of other windows proce

        4. Win32-Process-Memory 0.20 read and write memory of other windows proce

        5. Win32-Process-Perf 1.01 Performance counter for processes

        6. Win32-Process-Perf 1.01 Performance counter for processes

        not find any module, this module not in ppm?

        Lorn

        -www.slackwarezine.com.br-