Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: 99 Bottles Of Beer (can't we do better)

by screamingeagle (Curate)
on Feb 20, 2002 at 05:25 UTC ( #146505=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $nBottles = ($ARGV[0] > 0) ? $ARGV[0] :100;
    foreach (reverse(1 .. $nBottles)) {
    ...
    
    
    
  2. or download this
    $nBottles = ($ARGV[0] > 0) ? $ARGV[0] :100;
    foreach (reverse(1 .. $nBottles)) {
    print "\n$_ bottle",($_ == (1 || 2)) ? "" : "s"," of beer on the wall,
    +\n$_ bottle",($_ == (1 || 2)) ? "" : "s"," of beer,\nTake one down, p
    +ass it around,\n" , ($_ - 1)," bottle",(($_ - 1) == 1) ? " " : "s ","
    + of beer on the wall\n";}print "\n*burp*\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146505]
help
Chatterbox?
[Cosmic37]: Permissions are interesting earthlings. Did nature determine who gives permission and who asks permission. Who was the first to get permission? Are you not related to them as one big earthling family?
[karlgoethebier]: Cojones! We need cojones!
[karlgoethebier]: Ouch! Permissions! We need permissions!
[BarApp]: I can not use modules. I gain temporary access and still can not use modules.
[Cosmic37]: ta erix - this szabo geezer is pretty cool methinks and he writes about undef but I cannot see instructions for redefining the record separator after having undefined it
[Corion]: $/ = "wahtever";
[Corion]: (it's a magic variable)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-06-29 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (672 votes). Check out past polls.