Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Merge 2 strings like a zip

by Athanasius (Archbishop)
on Jul 09, 2015 at 03:00 UTC ( [id://1133864]=note: print w/replies, xml ) Need Help??


in reply to Re: Merge 2 strings like a zip
in thread Merge 2 strings like a zip

Hello 1nickt,

As a cleaner alternative to:

no warnings qw/ uninitialized /; print zip @a1, @a2; use warnings;

you can just filter the list returned by zip:

print grep { defined } zip @a1, @a2;

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-04-25 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found