Hello;

RE: ActivePerl-5.6.1

In a perl script of about 105 KB comprised of a main section
and about 10 subroutines, loop control counters are being pre-
incremented, eg:

        $idx = 0;
        for ($idx = 0; $idx < $max; $idx++) {
          <<  statements  >>
        }

If $max equals 1 (one) statements internal to the loop never execute.

The same thing occurs if the loop is translated to an equivalent while 
form.

Under the debugger, breaking at the for (or while) statement will 
show $idx = 1.  Note this is prior to the execution of the for/while
statement.

If, however, a watch is set on $idx, the error does not occur; 
statements internal to the for loop do execute if $max == 1.

The program reads from a single data file, and writes to multiple
output files, no graphical interface exists.  It runs from a shell
script.

At some point in the execution, the pre-incrementing stops and the
loops function normally.  I don't know if this change in continuous
or intermittent.

I have all variables declared and explicitly scoped.
I have run with warning on, and addressed every complaint it has.

Clearly, something is pathological about the program, but after
a week of chasing it, I'm out of gas.

If anyone has seen anything like this, and can suggest the types
of code constructs or lexical choices likely to induce the
interpreter to do this I will be very grateful.

If you know of a better list to which to send this request, that
would help too.


Thanks;

Allan Branscomb


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to