in reply to fork() && exit;

There's not much point of doing a 'fork && exit', except for detaching. 'fork && exit' means that the program forks, and if it succeeds, the parent immediately terminates. You are better off doing something like:
my $pid1 = fork err die "fork: $!"; # Get the // patch... unless ($pid1) { # Child 1 count; exit; } my $pid2 = fork err die "fork: $!"; unless ($pid2) { # Child 2 count2; exit; } # Parent. ....

Abigail

Replies are listed 'Best First'.
Re: Re: fork() && exit;
by stvn (Monsignor) on Feb 23, 2004 at 17:16 UTC

    This is the best I could find re: the err operator. Cool stuff though. Got any links to that path around Abigail?

    -stvn
      That's a document about perl6, which seems to be vaporware.

      Try the README and/or perldelta.pod file coming with a recent existing version of perl. I'm talking about working code, not fairy tales. ;-)

      Abigail

        Yeah I realized it was Perl 6, but it was i all i could find re: the err operator. ;-)

        -stvn
Re: Re: fork() && exit;
by stvn (Monsignor) on Feb 23, 2004 at 16:52 UTC
    Abigail,

    An initial google search and perldoc search didn't reveal anything about "fork err". Can you please provide a link to any info regarding it? TIA

    -stvn
      err is an operator (and has nothing to do with fork), which you get if you install the // patch (for 5.8.1, 5.8.2 or 5.8.3), or if you run bleadperl.

      Abigail