Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: How to call perl script within perl script ?

by sgt (Deacon)
on Nov 19, 2007 at 22:22 UTC ( #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
    • Comment on Re: How to call perl script within perl script ?
  • Log In?

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

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (2)
    As of 2023-10-04 20:35 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found