No such thing as a small change | |
PerlMonks |
Fork accessing global variables?by devslashneil (Friar) |
on Feb 20, 2004 at 03:20 UTC ( [id://330439]=perlquestion: print w/replies, xml ) | Need Help?? |
devslashneil has asked for the wisdom of the Perl Monks concerning the following question:
Hey Monks,
I was wondering if it was possible to fork off a section of code, i.e make it run independent to the rest of the script, whilst still giving it access to the global variables the script has? I need my script to sit waiting for connections using NetServer::Generic, whilst in the background waiting for messages, and pushing them to the appropriate client by calling a series of callbacks (subroutine references) stored in a global hash assorted with the username. To be honest i'm not even sure if i'm going about this the right way, i think what i need to do is sort of outside the bounds of NetServer::Generic, but i'd really like to avoid rewriting my existing code without this module as i don't have the time. Any help would be much appreciated
Neil Archibald Games on Demand
Back to
Seekers of Perl Wisdom
|
|