Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: (golf) Interlaced Strings

by Masem (Monsignor)
on May 02, 2001 at 07:05 UTC ( [id://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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found