Skip to content

Instantly share code, notes, and snippets.

@evandhoffman
Created January 10, 2013 16:22
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 evandhoffman/4503414 to your computer and use it in GitHub Desktop.
Save evandhoffman/4503414 to your computer and use it in GitHub Desktop.
This is a challenge?
#!/usr/bin/perl
for (my $i = 1; $i <= 100 ; $i++) {
my $out = '';
if (($i % 3) == 0) {
$out .= 'Fizz';
}
if (($i % 5) == 0) {
$out .= 'Buzz';
}
if ($out eq '') {
$out = $i;
}
print "$out\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment