How is that version of FizzBuzz shooting oneself in the foot?
I would have written that Perl code as for (1..100) { if (not $_ % 15) { say 'FizzBuzz' } elsif (not $_ % 3) { say 'Fizz' } elsif (not $_ % 5) { say 'Buzz' } else { say } } Just saying
How is that version of FizzBuzz shooting oneself in the foot?
I would have written that Perl code as for (1..100) { if (not $_ % 15) { say 'FizzBuzz' } elsif (not $_ % 3) { say 'Fizz' } elsif (not $_ % 5) { say 'Buzz' } else { say } } Just saying