Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: (Golf) Giving Change

by Trimbach (Curate)
on Jun 12, 2001 at 06:37 UTC ( #87713=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub c {($a,$c)=@_;@c=@$c;return map{$a>$_?
    &{sub{$a-=$_*($b=int($a/$_));"$b x $_"}}:""} reverse @c}
    
  2. or download this
    ,,1 x 20,,,2 x 1,2 x 0.25,,,
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://87713]
help
Chatterbox?
[Corion]: Hi marto!
[Corion]: I hope you were able to catch up on some sleep
Corion is slowly, slowly relaxing. Yesterday I spent vegging out in front of the PC, today at a friends, and hopefully I have the books for our Perl club done by Monday. I guess I'll only really relax once I get back from LPW
[marto]: last night, well this morning was a 5am finish, up from 4 am the previous day. Oddly I feel better today than I did yesterday
[Corion]: marto: I think the first thing sleep deprivation does is kill your sense of how tired you are :)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2017-11-19 11:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (280 votes). Check out past polls.

    Notices?