daily pastebin goal
50%
SHARE
TWEET

Perl FizzBuzz

jessicakennedy1028 Sep 9th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5. use diagnostics;
  6. use 5.10.0;
  7.  
  8. for my $i (1..100) {
  9.     !($i % 15) ? say "FizzBuzz"
  10.     !($i % 3)  ? say "Fizz"
  11.     !($i % 5)  ? say "Buzz"
  12.     say "$i";
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top