in reply to Re^4: Shared memory and asynchronous accessin thread Shared memory and asynchronous access
The exec line is met to run monitored.pl, not mon2.pl.
exec( $^X, 'monitored.pl', $port ) if ( $pid == 0 ); [download]
Thank you, BrowserUk++.