Execute another perl script from my perl script

Discussion in 'Perl Misc' started by Petterson Mikael, Jan 5, 2005.

  1. Hi,

    I have a perl script where I want to call another perl script.
    The perl script I want to call is ( including files):

    ${arc_bin}/addproj -p $project -r $release -i $isit -V $view

    I have tried eval() that I used in my shell script but it did not work.

    Any hints?

    //Mikael
     
    Petterson Mikael, Jan 5, 2005
    #1
    1. Advertising

  2. Petterson Mikael

    Shawn Corey Guest

    Petterson Mikael wrote:
    > Hi,
    >
    > I have a perl script where I want to call another perl script.
    > The perl script I want to call is ( including files):
    >
    > ${arc_bin}/addproj -p $project -r $release -i $isit -V $view
    >
    > I have tried eval() that I used in my shell script but it did not work.
    >
    > Any hints?
    >
    > //Mikael


    perldoc -f system
    perldoc -f exec
    perldoc perlop (See `)

    --- Shawn
     
    Shawn Corey, Jan 5, 2005
    #2
    1. Advertising

  3. Petterson Mikael

    Shawn Corey Guest

    Shawn Corey wrote:
    >
    >
    > Petterson Mikael wrote:
    >
    >> Hi,
    >>
    >> I have a perl script where I want to call another perl script.
    >> The perl script I want to call is ( including files):
    >>
    >> ${arc_bin}/addproj -p $project -r $release -i $isit -V $view
    >>
    >> I have tried eval() that I used in my shell script but it did not work.
    >>
    >> Any hints?
    >>
    >> //Mikael

    >
    >
    > perldoc -f system
    > perldoc -f exec
    > perldoc perlop (See `)
    >
    > --- Shawn


    I forgot:
    perldoc -f open (See |)

    --- Shawn
     
    Shawn Corey, Jan 5, 2005
    #3
  4. Petterson Mikael

    Paul Lalli Guest

    "Petterson Mikael" <> wrote in message
    news:crglm8$1al$...
    > I have a perl script where I want to call another perl script.
    > The perl script I want to call is ( including files):
    >
    > ${arc_bin}/addproj -p $project -r $release -i $isit -V $view
    >
    > I have tried eval() that I used in my shell script but it did not

    work.

    "did not work" is a poor error description. Please read the posting
    guidelines that are posted to this group regularly.

    > Any hints?


    There are a number of ways of executing external commands. Among them
    are:
    system (read: perldoc -f system)
    exec (read: perldoc -f exec)
    backticks (read: perldoc perlop, search for 'qx')
    pipes (read: perldoc -f open)

    Which one you want to use depends on what kind of information you want
    to retrieve from the command, and how you want to interact with the
    command.

    Paul Lalli
     
    Paul Lalli, Jan 5, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wet Basement
    Replies:
    1
    Views:
    2,542
    BobMonk
    Jul 15, 2003
  2. Rajat
    Replies:
    3
    Views:
    719
    Jorgen Grahn
    Jan 8, 2010
  3. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    579
    Jan Kaliszewski
    Jan 7, 2010
  4. kderaedt

    Execute shell script from a perl script

    kderaedt, Jun 26, 2003, in forum: Perl Misc
    Replies:
    3
    Views:
    179
    Andres Monroy-Hernandez
    Jun 26, 2003
  5. Replies:
    20
    Views:
    773
    Gunnar Hjalmarsson
    Jan 18, 2005
Loading...

Share This Page