if ( $pid = fork ) { ## parent process ## do parent stuff } else { ## child process my ( $foo, %bar, $bax ); Initialize_child(); do_child_stuff(); }