#!/usr/local/bin/perl -w # Server.plx ( really child after fork! ) use warnings; use strict; our $root; { ## $GlobalLock was opened by parent and is available to children for processing ## Child is waiting for work ( in my case usually a socket wait ) ## If child needs to work on any global variables, should lock/unlock with fork. ## And always check the return code from flock! }