[DFW.pm] Fizzbuzz assignment

Andrew Sohn asohn.unique at gmail.com
Thu Sep 11 14:35:07 PDT 2014


Here's my Fizz Buzz golf attempt... :)

print$_%3?'':Fizz,$_%5?'':Buzz,$_%3&&$_%5?$_:'',"\n"for 1..100
63 characters

On Thu, Sep 11, 2014 at 4:30 PM, Rob Eaglestone <robert.eaglestone at gmail.com
> wrote:

> Pounding one's head on the keyboard repeatedly again, I see.
>
> On Thu, Sep 11, 2014 at 4:12 PM, Christopher Spencer <chris at crspencer.com>
> wrote:
>
>>
>> map{if(!($_%3)){print"Fizz"}if(!($_%5)){print"Buzz"}if($_%3&&$_%5){print"$_"}print"\n"}(1..100)
>>
>> 97 characters. 1 line.
>>
>> -- Chris
>>
>> _______________________________________________
>> Dfw-pm mailing list
>> Dfw-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/dfw-pm
>>
>>
>
> _______________________________________________
> Dfw-pm mailing list
> Dfw-pm at pm.org
> http://mail.pm.org/mailman/listinfo/dfw-pm
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/dfw-pm/attachments/20140911/6bc8cdd2/attachment-0001.html>


More information about the Dfw-pm mailing list