use strict; foreach (1 .. 5) { my $pid = fork(); next if $pid; require IO::Socket::SSL; <--- random(); random(); exit; } sub random { print sprintf("Process %d: %d", $$, int(rand(100000))), "\n"; }