use strict; my $N = ; my $t = ""; for (my $i = 1; $i < $N; $i++) { if ($N % 3 == 0) { if ($N % 5 == 0) { $t = "FizzBuzz"; } else { $t = "Fizz"; } } elsif ($N % 5 == 0) { $t = "Buzz"; } else { $t = $i; } print "$t\n"; }