in reply to executing commands and getting output

You should investigate the open function (using a "|" in the file name). Or you could use the backtics: $output = `command`.

Replies are listed 'Best First'.
Re: Re: executing commands and getting output
by tja_ariani (Acolyte) on Sep 05, 2003 at 08:02 UTC
    Hi, I tried the $output = 'command' method but it doesn't seem to work. $output is empty and does not contain anything.
    With the open command, could you give me a clue of what does it actually do ?
    Thanks for your help
      $output = `command`; # ^ ^ # | |
      The quotes around command are backticks (ASCII 96, hex 60), not single quotes.

      As an alternative, you may use

      $output = qx(command);