http://qs321.pair.com?node_id=87862


in reply to Re: (Golf) Giving Change
in thread (Golf) Giving Change

I'm not sure how boo_radley counted 54 - it's actually 60. You count only the characters inside the sub. You should also add three characters to reset @r (thereby making this sub usable more than once).

Anyway, here's a solution at 54:

sub c{($t,$p)=@_;map{$t-=($x=int$t/$_)*$_;($_)x$x}reverse@$p}
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print