in reply to Executing independent commands in PERL

Try something like @log=qx/ping -t perlmonks.org/. Haven't tried it, but I think the qx operator is what you need, it returns the output of an external command. See man perlop, too.
  • Comment on Re: Executing independet commands in PERL

Replies are listed 'Best First'.
Re: Re: Executing independet commands in PERL
by dvergin (Monsignor) on Mar 05, 2001 at 03:45 UTC
    For the record, qx/.../  is the same as back-ticks.

    Update: Merlyn is correct, of course in his post following this one. I was just trying to make a friendly connection regarding function. But the effect of different delimiters has a bearing on function. Back-peddling as fast as possible... Umm... let's just call them close relatives...

      Almost. qx`...` would be the same as backticks. qx/.../ would have a slash for a delimiter, and hence require a different backslashing strategy. And qx'...' would have single-quote for a delimiter and not support variable interpolation or backslash escaping.

      -- Randal L. Schwartz, Perl hacker