local *coinFlip = sub { my $z = &getRand; my $coin = int($z)% 2; return $coin; };