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