Help for this page
... my $pid = fork; ... $kids{$pid} = $site; # only parent gets here ...
foreach $element (@updevices){ @ip = split(':',$element); ... # it has the array @pids # and all other global vars that your script # is full of...