Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Splitting every 3 digits?

by zeidrik (Scribe)
on Oct 01, 2001 at 11:05 UTC ( #115802=note: print w/ replies, xml ) Need Help??


in reply to Re: Splitting every 3 digits?
in thread Splitting every 3 digits?

How about this?

my $var="1112223334445556667"; $var=~s/(\d{3})/$1\_/g; my @nums=split(/_/,$var);


Comment on Re: Re: Splitting every 3 digits?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (16)
As of 2015-03-02 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (52 votes), past polls