sub birth { my ($birthage, $birthgender) = @_; for my $i ( 0..$n) { push(@$birthage, 0); push(@$birthgender, 1); } } birth(\@age,\@gender);