Results 1 to 5 of 5

Thread: Help me with PERL !!!

  1. #1
    Junior Member
    Join Date
    Sep 2001
    Posts
    14

    Angry Help me with PERL !!!

    Can u guys help me with PERL? My problem is quite simple : I want to create a new process in a PERL program and pass it arguments. It is something like this :

    system('/MyDir/MyProg.pl $arg1 $arg2 &');

    I don't know what's wrong with this! So if u've got an idea I will be glad if share it with me...

  2. #2
    Junior Member
    Join Date
    Aug 2001
    Posts
    2

    PERL help

    maybe this might help :
    $stat = system($program, $arg1, $arg2);
    die "$program died: $?" unless $stat == 0;

    cheerio
    eSkImO
    \"The reasonable man adapts himself to the world; the unreasonable one
    persists in trying to adapt the world to himself. Therefore all progress
    depends on the unreasonable man.\" --George Bernard Shaw

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Posts
    14

    Exclamation More precisely...

    Well I thank you for the tip. But more precisely, what I'm looking for is :

    --> creating a child process with arguments
    --> that the parent process doesn't wait for the ending of its child
    --> when the child is ended he terminates himself

    I think it's possible but I can't grab the right command...

  4. #4

    Question

    Not too sure about "Perl", but, concept that you're looking for is called "forking". In C, when you fork() a process the child acts as an indepdent process from the parent, inheriting the parents permissions. Maybe with that you'll be able to search http://www.google.com for a tutorial, or information on how to fork() processes in Perl
    Jason Parker - http://www.o-negative.net
    o-Negative: Information Network

  5. #5
    Junior Member
    Join Date
    Sep 2001
    Posts
    2
    heres the info at perl monks.

    but beware of zombies!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •