On Jun 14, 2007, at 12:49 PM, Jorge Almeida wrote:

Martin was right (and I should have seen it from the start). The "will
go ahead as much as possible" is true only in the sense that the
greatest possible string of non-digits will be selected for deletion.
With '$s=~s/\D*//;' in line 5 that string will be empty. In order to
delete the trailing string, the '/g' is needed (but I knew that, as I
said in the original post).

Oh I am sorry, I replied too quick and didn't read that part. The use of two s/// in a row hinted to me that there was a naive use s/// there missing /g. Clearly that was not the case and the question was different.

Sorry!

-- fxn




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to