chomp($_ = ); foreach (1..$_) { if ($_%3 == 0 || $_%5 == 0) { print "Fizz" if ($_%3 == 0); print "Buzz" if ($_%5 == 0); } else { print $_; } print "\n"; }