for my $i (1..100) { if ( not $i % 15 ) { print "FizzBuzz"; } elsif ( not $i % 3 ) { print "Fizz"; } elsif ( not $i % 5 ) { print "Buzz"; } else { print $i; } print "\t\t"; print "\n" unless $i % 5; # that's just sugar for nicer tabular view }