in reply to strange behaviour when forking lots of times

It took me a while to understand this code. As you may guess, I, too, am new at Perl but have had many years' work with C. From my C-programming perspective, I interpreted your code as forking and then (if you are the child) executing the command 'print for split (//, "a" x 10)' However, this is one of those areas where Perl is quite different from C. The 'for' is a statement modifier, and so affects the entire command. So 10 child processes are created, each of which forks 9 times, and so on. (Resulting in the 10! processes mentioned above). Just an alternate perspective from someone who's still new at this strange stuff. Dervish
  • Comment on Re: strange behaviour when forking lots of times