<?xml version="1.0" encoding="windows-1252"?>
<node id="87765" title="Re:{2} (Golf) Giving Change" created="2001-06-12 10:54:13" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="41288">
jeroenes</author>
<data>
<field name="doctext">
Nice solution. There is room for improvement, though.
No need for return, use that for filtering out empty items:
&lt;code&gt;
sub c {($a,$c)=@_;@c=@$c;grep$_,map{$a&gt;$_?
  &amp;{sub{$a-=$_*($b=int($a/$_));"$b x $_"}}:""} reverse @c}  
&lt;/code&gt;
Char-neutral, but leaving the grep out gains 7 chars.
&lt;p&gt;
You don't need the parens after the int, and leave out the
spaces around the reverse. Gains you 4 char:
&lt;code&gt;
sub c{($a,$c)=@_;@c=@$c;grep$_,map{$a&gt;$_?
  &amp;{sub{$a-=$_*($b=int$a/$_);"$b x $_"}}:""}reverse@c}
&lt;/code&gt;
&lt;p&gt;Jeroen&lt;br&gt;
&lt;i&gt;"We are not alone"(FZ)&lt;/i&gt;</field>
<field name="root_node">
87681</field>
<field name="parent_node">
87713</field>
</data>
</node>
