<?xml version="1.0" encoding="windows-1252"?>
<node id="64013" title="SHORTER Useless code" created="2001-03-12 22:10:38" updated="2005-08-15 00:24:57">
<type id="11">
note</type>
<author id="53200">
arhuman</author>
<data>
<field name="doctext">
It's been a game between [Gloom] and me, but may be you may like it too !&lt;br&gt;
&lt;br&gt;
So, If you're interested in [id://21442|Perl golf], come on and join the contest...&lt;br&gt;
Let's turn this 'useless code' into '&lt;b&gt;shortest&lt;/b&gt; useless code'&lt;br&gt;
(RULE: Reproduce the spiral made by gloom with the fewest char.&lt;br&gt;
the screen cleaning, shebang and the like aren't necessary...)&lt;br&gt;
&lt;br&gt;
Here is my contribution (84 char):&lt;br&gt;
&lt;code&gt;
$n=20;$i=1;while($n){map{print"\e[$a;${b}H@";${$n&gt;$_?*b:*a}+=$i}1..2*($n-=2);$i*=-1}
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
PS: For a really impressive PerlGolf example see [id://59718|this].&lt;br&gt;
&lt;br&gt;
&lt;br&gt;"Trying to be a SMART lamer" (thanx to &lt;a href="/index.pl?node=Merlyn&amp;lastnode_id=1072"&gt;Merlyn&lt;/a&gt; ;-)&lt;br&gt;</field>
<field name="root_node">
63125</field>
<field name="parent_node">
63125</field>
</data>
</node>
