3 ms·
Even that Perl isn't as tidy as it could be. I'd be inclined to have `for my $n (1..100)`, and use `say` instead of print. I might even skip the `== 0` but just
by eythian 6y ago
Even that Perl isn't as tidy as it could be. I'd be inclined to have `for my $n (1..100)`, and use `say` instead of print. I might even skip the `== 0` but just saying `(! $n % 15)`, but I'm on the fence about that.
I also wouldn't keep all the blocks on the same line, but it can be forgiven in a comment box.
- tzs 6y ago> I'd be inclined to have `for my $n (1..100)` I actually had that at first... > I might even skip the `== 0` but just saying `(! $n % 15)` ...and that too. I changed them to be more likely to be obvious to even someone who has never seen Perl before. A lot of languages besides Perl have a "for" loop variant that is like a C "for" loop. The formatting was indeed because it was in a comment box. I didn't want to take up too much vertical space on the page.