Your code isn't sufficiently obvious to me to see the flow of control and what you expect (nor do I understand how you're using __DATA__, but if you have a filehandle open in a parent and a child simultaneously (that is, if you've opened it in a parent and access it in a child), they share the same position in the file. Re-open the filehandle in the children before doing anything which will affect the file position, or read the data before forking off any kids.
In reply to Re: Bug in __DATA__ filehandle
by chromatic
in thread Bug in __DATA__ filehandle
by prefectuous
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |