Executing External Program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maestomani
    New Member
    • Jul 2008
    • 3

    Executing External Program

    Hi There,

    How to execute series of unix command in perl program exec --> only the first command and end the program. It will be more useful you tell me how to pass extra arguments in the command.

    BRs
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    This sounds suspiciously like a homework question you are supposed to figure out. What you want to do is read up on system() command. If you know how to run the script you want, that that will do it.

    Regards,

    Jeff

    Comment

    • eWish
      Recognized Expert Contributor
      • Jul 2007
      • 973

      #3
      Also have a look at the docs for exec().

      --Kevin

      Comment

      • numberwhun
        Recognized Expert Moderator Specialist
        • May 2007
        • 3467

        #4
        Originally posted by eWish
        Also have a look at the docs for exec().

        --Kevin
        One problem with exec() though, is that is needs to be used in a forked process, otherwise, any Perl code following it is useless and will not get executed.

        Regards,

        Jeff

        Comment

        Working...