Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Counting positive numbers

by moritz (Cardinal)
on Jun 29, 2010 at 13:06 UTC ( #847119=note: print w/ replies, xml ) Need Help??


in reply to Counting positive numbers

Perl 6 solution, with latest Rakudo (ie built today):

# 12345678901234567890123456 perl6 -e 'get;say [+]lines.grep: *>0'

26 character if you don't count the quotes.

Perl 6 - links to (nearly) everything that is Perl 6.


Comment on Re: Counting positive numbers
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-20 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls