if (my $pid = fork()) { # network stuff } else { # file stuff }