<?xml version="1.0" encoding="windows-1252"?>
<node id="77237" title="(Golf) Reversal" created="2001-05-02 04:38:46" updated="2005-08-15 14:24:46">
<type id="120">
perlmeditation</type>
<author id="1936">
japhy</author>
<data>
<field name="doctext">
This looks deceptively easy.  My code (which I believe is as short as possible) is 11 characters.  (Perhaps this is unfair -- it's more like a "who can hit the ball where I hit it" challenge than a "who can hit the ball far" challenge.)

&lt;p&gt;

&lt;b&gt;Goal:&lt;/b&gt; create a function that takes a list of strings as its arguments and returns the characters of those strings in reversed order.  &lt;i&gt;That's it!&lt;/i&gt;

&lt;code&gt;
print R(123);       # 321
print R(12,34,56);  # 654321
sub R {...}         # &lt;-- my best score: 11
&lt;/code&gt;

More than meets the eye.  I'm betting a handful of you get an answer of 14 characters, but there might be a couple who slip through and figure out the trick to save a character, and another few to get it down to 11.

&lt;br&gt;&lt;br&gt;
&lt;tt&gt;&lt;font color="#0000ff"&gt;japhy&lt;/font&gt;&lt;/tt&gt; -- 
&lt;a href="/index.pl?node=japhy&amp;lastnode_id=1072"&gt;Perl and Regex Hacker&lt;/a&gt;</field>
</data>
</node>
