News for hackers. Stuff that matters.
Re:Fizzbuzz, Interviews, And Overthinking by prakashk on Friday October 05, 2012 @12:05AM (#4615638)
Perl:

    # 97 characters
    for my $i (1..100) { say join("", map { {3=>'fizz',5=>'buzz'}->{$_} unless $i % $_ } 3,5) || $i }

    # 81, if those pesky spaces are removed
    for my$i(1..100){say join("",map{{3=>'fizz',5=>'buzz'}->{$_}unless$i%$_}3,5)||$i}

There are no comments on this comment yet.