RE: [Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Jeremy Muhlich
On Tue, 2004-01-27 at 17:41, Tolkin, Steve wrote: > In principle quite complex code can be analyzed > to determine accurately that the data is not modified. What if the variable in question is actually tied, and a "read" operation on the variable actually modifies the value? In certain other

Re: [Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Uri Guttman
> "TS" == Tolkin, Steve <[EMAIL PROTECTED]> writes: TS> OK, My comments below apply to this and Uri's similar comments. TS> I should have said: this infinite loop is easy to detect because: TS> 1. the pattern is constant TS> 2. the data (here $_) is not modified in the loop TS>

RE: [Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Tolkin, Steve
OK, My comments below apply to this and Uri's similar comments. I should have said: this infinite loop is easy to detect because: 1. the pattern is constant 2. the data (here $_) is not modified in the loop Both points are obvious to a person. In this simple and important special case it is

Re: [Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Ronald J Kimball
On Tue, Jan 27, 2004 at 05:04:03PM -0500, Tolkin, Steve wrote: > # run using e.g. echo hello | perl this-file > > # Why doesn't perl produce a warning from the following. It is an > # infinite loop. If I add a /g modifier to the m// it works fine. > > while (<>) { > while (m/([a-z])/) { #

Re: [Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Uri Guttman
> "TS" == Tolkin, Steve <[EMAIL PROTECTED]> writes: TS> # run using e.g. echo hello | perl this-file TS> # Why doesn't perl produce a warning from the following. It is an TS> # infinite loop. If I add a /g modifier to the m// it works fine. TS> while (<>) { TS> while

RE: [Boston.pm] using {3-8} instead of {3, 8} doesn't produce eve n a warning?

2004-01-27 Thread Tolkin, Steve
Thanks for the explanation. So this is a documented "feature". I was fooled by believing the general principle that special characters are special unless escaped with a backslash. I would have greatly preferred consistency in this. Are there other known (and perhaps even documented) violations

[Boston.pm] why no warning about this infinite loop

2004-01-27 Thread Tolkin, Steve
Title: why no warning about this infinite loop # run using e.g. echo hello | perl this-file # Why doesn't perl produce a warning from the following.  It is an # infinite loop.  If I add a /g modifier to the m// it works fine. while (<>) {     while (m/([a-z])/) { # warning infinite

Re: [Boston.pm] using {3-8} instead of {3, 8} doesn't produce even a warning?

2004-01-27 Thread Ronald J Kimball
On Tue, Jan 27, 2004 at 04:55:28PM -0500, Tolkin, Steve wrote: > # run using e.g. echo hello | perl this-file > > # Why doesn't perl produce a warning from {3-8} ? This seems > # to be a syntax error. It surely is not the way to match strings of length > 3 - 8. It > # should be {3,8} . > >

[Boston.pm] using {3-8} instead of {3, 8} doesn't produce even a warning?

2004-01-27 Thread Tolkin, Steve
Title: using {3-8} instead of {3,8} doesn't produce even a warning? # run using e.g. echo hello | perl this-file # Why doesn't perl produce a warning from {3-8} ?  This seems # to be a syntax error.  It surely is not the way to match strings of length 3 - 8.  It # should be {3,8} . while