Saturday 15 January 2011

start new shell from perl script and execute the rest of code on the child shell -


I want to start a new shell from Perl (which I am doing with the exec statement ). When the baby's shell starts, I want to print some messages on the new shell and want to run another Pearl script on the hair follicle.

I am doing this:

  Exec $ enV {SHELL};  

Please help.

depends on what you want to do

  • Pearl By the process of fork and a condition (exhaust code)
  • I think that after you are back after ticks `` < / P>

    See some good examples about how to capture the output of an external command. Note that the back cutts are fork.

    I want to use pre-quote like operator qx instead of backlit.

    Example:

      My $ ls = qx / ls /; My $ ret_ls = $? & Gt; & Gt; 8; Print "output: $ ls \ n edit code: $ ret_ls"; Second example:   My $ ret_other_script = $? & Gt; & Gt; 8; Print "output: $ other_cript_output \ n code code: $ ret_other_script";  

    If you want to talk to the program with that process, then you are going for diving in Open2 / Open 3.


    No comments:

    Post a Comment