-
-
Save jfryman/b26f707ffbaeb748c254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
die "Please do not run this script without reading the documentation" | |
if not @ARGV; | |
my $strength = $ARGV[0] + 1; | |
while (not fork) { | |
exit unless --$strength; | |
print 0; | |
twist: while (fork) { | |
exit unless --$strength; | |
print 1; | |
} | |
} | |
goto 'twist' if --$strength; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment