Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: System calls
by Django (Pilgrim) on Jun 08, 2004 at 10:10 UTC
Re: System calls
by rinceWind (Monsignor) on Jun 08, 2004 at 10:10 UTC
    perldoc -f system or the 'backtick' operator is the simplest. Returns a string containing the output.

    If you want to send something to the command's input stream or read from its output stream a line at a time, use the piped open:

    open FIL,'cmd arg arg|' or die "Failed to fork, $!";

    If you need to do both reading and writing, use open3, or for a more friendly API, you might like to try IPC::Open3

    --
    I'm Not Just Another Perl Hacker

Re: System calls
by BUU (Prior) on Jun 08, 2004 at 10:04 UTC
Re: System calls
by tbone1 (Monsignor) on Jun 08, 2004 at 12:36 UTC
      How to invoke a DOS command

    "With great misgivings", I'd say.

    </unixsnob>

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee