Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://115802]
help
Chatterbox?
[holli]: *sigh* why has there to be drama in such a thread?
[LanX]: ?
[holli]: Re^2: Let's Make PerlMonks Great Again! -- suggestions and dreams - STFU and write code already (start already)
[LanX]: it was just after Trump-ageddon and the Americans thought I'm ridiculing them ;)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2017-11-20 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?