webshark has asked for the wisdom of the Perl Monks concerning the following question:
which I think is right.. but just so confused about where it fits in with my script :-($pid=fork; if ($pid==0) {try and start new process with exec??} elsif ($pid) {do what I want to do with this script??} else {die because of fork error }
while (1) { my $time = time(); print $sock "$data\r\n"; my @output; my $output = join( '', @output ); while (<$sock>) { if ( $output = /$match/ ) { print STDOUT; open(STDOUT, "| $email"); last; } else { print STDOUT; open(STDOUT, "| $logger"); last; } } }
janitored by ybiC: Retitle from "newbie in a mucking fuddle" for better site searching
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Confused by fork examples
by ambrus (Abbot) on Dec 18, 2005 at 11:49 UTC | |
by Limbic~Region (Chancellor) on Feb 20, 2009 at 17:58 UTC | |
by MidLifeXis (Monsignor) on Feb 20, 2009 at 18:20 UTC | |
by mr_mischief (Monsignor) on Feb 20, 2009 at 18:35 UTC | |
Re: Confused by fork examples
by reasonablekeith (Deacon) on Dec 18, 2005 at 11:28 UTC | |
Re: Confused by fork examples
by QM (Parson) on Dec 18, 2005 at 16:08 UTC |