If you comment the line beginning with my you have a normal sub (that should return undef btw). Don't make the die to exit, because there are Situations where it's needed.sub RUN { my$i;return$i||0if($i=fork)||!defined$i;die"\n"if"-".do #tasksub head { #your code here, you are forked already } }
In reply to Re: Multiple forks get re-executed
by Anonymous Monk
in thread Multiple forks get re-executed
by pltommyo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |