Sten has asked for the wisdom of the Perl Monks concerning the following question:
---------------------------------#!C:\perl\bin\perl.exe $|= 1; my $counter= 1; while ($counter) { print "\n\nStart: $counter"; if( fork() eq 0 ) { countup($counter); exit; } print "\nEnd: $counter"; $counter++; sleep 1; } exit; sub countup { my $counter= shift; print "\nInFork: $counter"; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Fork() win32 perl 5.8.4 ActiveState
by Anonymous Monk on Jan 19, 2007 at 13:34 UTC |