Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to call perl script within perl script ?

by sgt (Deacon)
on Nov 19, 2007 at 22:22 UTC ( [id://651780]=note: print w/replies, xml ) Need Help??


in reply to How to call perl script within perl script ?

Besides all the excellent advice already given there is one important aspect: processes!

For example on unix-like the question would be

  • Do you want to start another process and wait till it finishes?: system or even system with time-out (if you shell supports it). Still you'll need to record the status carefully to know if the execution went OK or no.
  • Do you want to run some more code in the same process?: do, require or eval "string".
  • Do you need to fire one or more processes and then communicate with them to hand out tasks or queries (worker or co-process view)?: then you have the whole spectrum of IPC.

    All of those have their use. The firing of an external process is often neglected these days but lets the OS do the safety net (restarting yourself can be a useful trick even). Choose wisely ;)

    cheers --stephan
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://651780]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others examining the Monastery: (8)
    As of 2024-03-29 14:14 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found