<?xml version="1.0" encoding="windows-1252"?>
<node id="77225" title="Re: (golf) Interlaced Strings" created="2001-05-02 03:18:51" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="34691">
Chmrr</author>
<data>
<field name="doctext">
I apparently just beat out [premchai21], the current leader, by one character:
&lt;code&gt;
#!/usr/bin/perl -w
use strict;
print j('Ti sats','hri  et'),"\n";

sub j {
my($a,$b)=@_;$a=~s/(.)/$1.substr($b,length($`),1)/ge;return$a;
}
&lt;/code&gt;
&lt;p&gt;62 characters.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: Same basic idea as [japhy] had, but worse execution.  Ahh, well.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Update 2&lt;/b&gt;: After seeing [japhy]'s code, I can whittle it down to 40 chars.  All credit for the idea goes to [japhy], though:&lt;code&gt;
sub j {
$_=pop;@_=split//,pop;s/./shift.$&amp;/eg;$_
}&lt;/code&gt;
&lt;P&gt;&amp;nbsp; &lt;br /&gt;perl -e 'print "I love $^X$\"$]!$/"#$&amp;V"+@( NO CARRIER'&lt;/p&gt;</field>
<field name="root_node">
77203</field>
<field name="parent_node">
77203</field>
</data>
</node>
