Skip to content

Instantly share code, notes, and snippets.

@hakobe
Created July 26, 2010 12:37
Show Gist options
  • Save hakobe/490480 to your computer and use it in GitHub Desktop.
Save hakobe/490480 to your computer and use it in GitHub Desktop.
my $i = 1;
START:
goto "END" if $i > 35;
goto "PRINT_FIZZBUZZ" if $i % 15 == 0;
goto "PRINT_FIZZ" if $i % 3 == 0;
goto "PRINT_BUZZ" if $i % 5 == 0;
goto "PRINT_NUM";
PRINT_NUM:_
print $i;
goto "PRINT_NL";
PRINT_FIZZ:_
print "fizz";
goto "PRINT_NL";
PRINT_BUZZ:_
print "buzz";
goto "PRINT_NL";
PRINT_FIZZBUZZ:_
print "fizzbuzz";
goto "PRINT_NL";
PRINT_NL:_
print "\n";
$i++;
goto "START";
END:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment