Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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 scrutinizing the Monastery: (8)
As of 2015-07-07 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls