Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Split on every second character

by GrandFather (Sage)
on Feb 12, 2010 at 23:05 UTC ( #822950=note: print w/ replies, xml ) Need Help??


in reply to Re: Split on every second character
in thread Split on every second character

and if you are unsure but want the last character for odd length strings you can:

my @list = $str =~ /(..?)/g;

True laziness is hard work


Comment on Re^2: Split on every second character
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2016-02-06 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (235 votes), past polls