in reply to Re (tilly) 1: Regular expression
in thread Regular expression

So the '1' is taking the place of '{}'? It looks like you are right because I try
while (s/(\d)(\d\d\d)(?!\d)/$1,$2/){}
and that works.

So this line is similar to the form 'do x while (this is true)' where the 'do x' in this case is just '1', which does nothing. I think I see, now. Thanks!

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar";
$nysus = $PM . $MCF;

Replies are listed 'Best First'.
1: Regular expression
by John M. Dlugosz (Monsignor) on Jun 08, 2001 at 00:29 UTC
    Exactly!