Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: 99 bottles, 2 lines

by jepri (Parson)
on Nov 28, 2000 at 13:40 UTC ( [id://43638]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    foreach(1..99){$b="\n$_ bottle@{[$_!=1&&s=>]} of beer";push@a,",\nTake
    + one down, pass it round,$d@{$d=$b.' on the wall'}\n",$d.$b};print re
    +verse@a;
    
  2. or download this
    seek DATA, 38,0;                                                      
    +          
    $_=join("",<DATA>);                                                   
    +         
    ...
    s/$b/$b-1/e;                                                          
    +          
    s/ (\$.)/$1 bottles of beer/g;                                        
    +          
    eval;__DATA__
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found