Orchid Fairy (兰花仙子) wrote: > On Wed, Nov 25, 2009 at 11:06 AM, John W. Krahn <jwkr...@shaw.ca> wrote: > > >> $ perl -le '$_="aXXXb"; print "one word is $1 at $-[0] to $+[0]" while >> /(X*)/g;' >> one word is at 0 to 0 >> one word is XXX at 1 to 4 >> one word is at 4 to 4 >> one word is at 5 to 5 >> >> > > Thanks that's so smart~ > > But I'm still confused since 4 is the end, why still run for the last > step of 5 to 5? > > //Fairy > > Maybe I think the last word could be the meaning of the length of the string ... I don't know if it is right .
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/