Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://529018]
help
Chatterbox?
[beech]: thank you, it sure is pretty "code", yup, thats what I call it my ...
beech .oO( talking 'bout my ...)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2017-02-28 08:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (398 votes). Check out past polls.