Skip to content

Instantly share code, notes, and snippets.

@jfryman
Created December 10, 2012 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfryman/b26f707ffbaeb748c254 to your computer and use it in GitHub Desktop.
Save jfryman/b26f707ffbaeb748c254 to your computer and use it in GitHub Desktop.
#!/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