On 3/10/06, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > Hi > > thanks for the reply. I can't use the if condition twice > as the code after the outside system command is supposed > to get executed only after completion of former. > > about the installation, yes i am using the tarball to install it. > system flags -O3, gentoo system. > > thanks > Saurabh >
use cpan to install. As for the flow, you need to do something like this: # whatever happens before the fork my $child = fork() or die "couldn't fork: $!\n"; unless ($child) { # put everything you want executed by the child here } if ($child) { # put everything you want executed by the parent, but not # the child here } # from here on out, everything will be executed by both # the parent and the child Alternatively, if there is nothing you want both processes to do, you could do something like this: # whatever happens before the fork my $child = fork() or die "couldn't fork: $!\n"; unless ($child) { # put everything you want executed by the child here exit 0; # child will die } # everything from here on out will be executed only by # the parent: the child will exit at exit(). If there are things you want the parent to do only after the child has finished executing, read the docs for wait() and waitpid(). HTH, -- jay -------------------------------------------------- This email and attachment(s): [ ] blogable; [ x ] ask first; [ ] private and confidential daggerquill [at] gmail [dot] com http://www.tuaw.com http://www.dpguru.com http://www.engatiki.org values of β will give rise to dom!