Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Re: (golf) Interlaced Strings

by Masem (Monsignor)
on May 02, 2001 at 07:05 UTC ( #77218=note: print w/ replies, xml ) Need Help??


in reply to (golf) Interlaced Strings

For the main part: 75 char in the sub: (4 less if you don't mind uninit'd values)

#!/usr/bin/perl -w use strict; my $a = "Ti sats."; my $b = "hsi et"; my $c = j( $a, $b ); print $c."\n"; sub j { my@a=split//,shift;my@b=split//,shift;return join'',map{$_,shift@b||'' +}@a; }

Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain


Comment on Re: (golf) Interlaced Strings
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://77218]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2014-04-20 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls