<?xml version="1.0" encoding="windows-1252"?>
<node id="87862" title="Re: Re: (Golf) Giving Change" created="2001-06-12 16:22:20" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="17251">
MeowChow</author>
<data>
<field name="doctext">
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 &lt;tt&gt;@r&lt;/tt&gt; (thereby making this sub usable more than once).
&lt;p&gt;
Anyway, here's a solution at 54:
&lt;code&gt;
sub c{($t,$p)=@_;map{$t-=($x=int$t/$_)*$_;($_)x$x}reverse@$p}
&lt;/code&gt;
&lt;pre&gt;
  &lt;a href="/index.pl?node=MeowChow"&gt; MeowChow                                   &lt;/a&gt;
               s aamecha.s a..a\u$&amp;owag.print&lt;/pre&gt;</field>
<field name="root_node">
87681</field>
<field name="parent_node">
87768</field>
</data>
</node>
