Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Golf Challenge: FizzBuzz

by tweetiepooh (Friar)
on Jun 02, 2009 at 15:25 UTC ( #767637=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Golf Challenge: FizzBuzz
in thread Golf Challenge: FizzBuzz

#2345678901234567890123456789012345678901234567 warn+(Fizz)[$_%3].(Buzz)[$_%5]||$_,$/for 1..100
also works with one fewer characters.
#2345678901234567890123456789012345678901234 perl -M5.01 -e 'say+(Fizz)[$_%3].(Buzz)[$_%5]||$_,for 1..100'
But this isn't really golf since you need to add -M5.01 to the calling statement.


Comment on Re^3: Golf Challenge: FizzBuzz
Select or Download Code
Replies are listed 'Best First'.
Re^4: Golf Challenge: FizzBuzz
by shmem (Canon) on Jun 02, 2009 at 18:28 UTC

    As you can see from the date of the post to which you answered, it was written previous to the release of perl5.10 - there is no 'say' in 5.8.8...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://767637]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2015-07-30 04:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls