<div dir="ltr"><div><div>Solution below:<br></div><div><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>my $x = 1; <br><br>while ($x <= 100)<br>{<br>    if (($x % 3 == 0) && ($x % 5 == 0))<br>  {<br>   print "FizzBuzz\n";<br>  }<br>  elsif ($x % 3 == 0)<br>  {<br>   print "Fizz\n";<br>  }<br>  elsif ($x % 5 == 0)<br>  {<br>   print "Buzz\n";<br>  }<br>  else<br>  { <br>   print "$x\n";<br>  }<br>  $x++;<br>}<br><br></div>I minorly "cheated" in that I didn't know the sign in Perl for "mod" but had read Bob's email previously (before learning about the challenge) and realized what he was doing with the % sign.   Had I been in an interview I probably would have used every special character in turn until I figured out the symbol for mod. <br><br></div>So I guess I can "program my way out of a wet paper bag" as this <a href="http://c2.com/cgi/wiki?FizzBuzzTest">website</a> proclaimed about the FizzBuzz test. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 11:42 AM, John Fields <span dir="ltr"><<a href="mailto:wigthft@gmail.com" target="_blank">wigthft@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Firstly,  I want to thank John Dexter for his Docker presentation, showing how to encapsulate a Mojolicious Web server and application for easy deployment. He got what all presenters get, a free dinner and that warm afterglow from making the world a better place (with more Perl in it).  :)</p>
<p dir="ltr">I challenged the attendees last night to do the FizzBuzz program.  We even had one programmer in attendance that had been asked to do it on a job interview the previous day!  We were one day late for him, but hopefully not for you..</p>
<p dir="ltr"><a href="Http://rosettecode.org/wiki/FizzBuzz" target="_blank">Http://rosettecode.org/wiki/FizzBuzz</a></p>
<p dir="ltr">Don't cheat.. Yourself.  Do it from scratch before looking at other's solutions.  We will pick 2 more, with increasing difficulty with one per week.  Also new member Andy Sohn will offer a short challenge and demonstrate answers live at the next Mongers.</p>
<p dir="ltr">So send in your code, and be as creative as you can!  TIMTOWTDI is a strength after all.  :)</p>
<p dir="ltr">Cheers,<br>
John and Tommy </p>
<br>_______________________________________________<br>
Dfw-pm mailing list<br>
<a href="mailto:Dfw-pm@pm.org">Dfw-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/dfw-pm" target="_blank">http://mail.pm.org/mailman/listinfo/dfw-pm</a><br>
<br></blockquote></div><br></div>