in reply to Global variable acts like local variable why?

The child gets a copy of the parent's variables at the time of the fork, and from then on those copies are separate. If you're trying to get your child to exit, you probably want to look at kill. More generally, have a look at perlipc for any time you want to communicate between processes.

  • Comment on Re: Global variable acts like local variable why?