Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Merge 2 strings like a zip

by sundialsvc4 (Abbot)
on Jul 09, 2015 at 11:50 UTC ( [id://1133945]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    perl -e 'use strict; use warnings; my $a="ABCDE"; my $b="xyz"; my $res
    +ult=""; my $i; for ($i=0; $i<length($b); $i++) { $result .= substr($a
    +, $i, 1) . substr($b, $i, 1) }; $result .= substr($a, $i); print "$re
    +sult\n";'
    
  2. or download this
    use strict;
    use warnings;
    ...
    XAYBZCZY
    AXBYCZZY
    XXYYZZZZYY
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-20 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found