Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^4: too much free time

by TheDamian (Priest)
on Apr 01, 2014 at 21:27 UTC ( #1080641=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my @bottles_of_beer
           = map {join "", "$_ bottle", $_ ne 1 && 's' || '', " of beer"},
    ...
                "Take one down, pass it around,\n",
                "@bottles_of_beer[--$n] on the wall.\n";
        }
    
  2. or download this
        sub bottles {
            my ($n) = @_;
    ...
            say  bottles($_ - 1), " of beer on the wall.";
            say  "";
        }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2015-07-05 17:39 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 (67 votes), past polls