Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
XP is just a number
 
PerlMonks  

Re: Splitting a string

by mickeyn (Priest)
on Feb 09, 2006 at 08:08 UTC ( #529018=note: print w/ replies, xml ) Need Help??


in reply to Splitting a string

Please try this:

my $mystring = "perl monks"; my $tmpstring = $mystring; my $my_splitted_string = ""; while ($tmpstring) { $tmpstring =~ m/^(\w{2})/ and $my_splitted_string .= $1." "; $tmpstring =~ s/^.//; } print "$my_splitted_string\n";

Enjoy,
Mickey


Comment on Re: Splitting a string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-04-16 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (436 votes), past polls