nysus has asked for the wisdom of the Perl Monks concerning the following question:
Which would take something like '3333333431234321234' and convert it nicely to 3,333,333,431,234,321,234. How does this work? I comprehend the RE itself and that the while forces looping when the condition is true but what does that '1' do?# put commas in the right places in an integer 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/;
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Regular expression
by tye (Sage) on Jun 07, 2001 at 20:50 UTC | |
by japhy (Canon) on Jun 07, 2001 at 20:57 UTC | |
by Adam (Vicar) on Jun 08, 2001 at 01:37 UTC | |
by tye (Sage) on Jun 11, 2001 at 21:58 UTC | |
|
Re (tilly) 1: Regular expression
by tilly (Archbishop) on Jun 07, 2001 at 20:30 UTC | |
by nysus (Parson) on Jun 07, 2001 at 20:41 UTC | |
by John M. Dlugosz (Monsignor) on Jun 08, 2001 at 00:29 UTC | |
|
Re: Regular expression
by MeowChow (Vicar) on Jun 07, 2001 at 22:52 UTC | |
by John M. Dlugosz (Monsignor) on Jun 08, 2001 at 00:32 UTC | |
|
Re: Regular expression
by bwana147 (Pilgrim) on Jun 07, 2001 at 20:32 UTC | |
|
Re: Regular expression
by lestrrat (Deacon) on Jun 07, 2001 at 20:32 UTC | |
by alfie (Pilgrim) on Jun 07, 2001 at 20:41 UTC | |
by lestrrat (Deacon) on Jun 08, 2001 at 00:45 UTC | |
|
Re: Regular expression
by alfie (Pilgrim) on Jun 07, 2001 at 20:36 UTC |