good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
First, fork doesn't return -1 on error. It returns undef. Perhaps you were thinking of something else. (I hope that's not the way you've been coding your fork checking all this time!)
Second, as one odd way to solve your problem, you could execute one of a few code blocks: OK, maybe not much better, but at least you don't compute it more than once. -- Randal L. Schwartz, Perl hacker
In reply to Re^2: Control Structures
by merlyn
|
|