in reply to Re^3: split loop error
in thread split loop error

Thanks again for the feedback.

I verified that the problem isn't really with the while (<>) type of idiom nor with the assignment of a scalar. As tall man suggests those are pretty common operations and it would be utter chaos if they broke like this. Why the error messages points to line 1 is yet another question.

The problem is in the regex of the split statement. If I do as tall man suggests and remove the capturing parenthesis, the error continues. However, if I pare things down to ...

@outLine = split(/(<.*>)/,$line);
and this works as it should. Of course, this is not the same as what I want to do, but I think it helps to isolate the problem.

So, I'm fairly near convinced there is a bug in the split regex handling of i386 multi thread. Am I missing something here?

Thanks! Ted

Replies are listed 'Best First'.
Re^5: split loop error
by tall_man (Parson) on Feb 04, 2003 at 15:45 UTC
    Alas for those who proclaim Death to Dot Star!

    I have no clue yet on why you are getting this bug, but I had another idea for a work-around. Can you make your expression non-greedy without it breaking?

    @outLine = split(/(<.*?>)/,$line);
    If that works, you at least have a work-around to split the line as you wanted until a real fix is found.

    Update: One more idea. Have you tried tracing the failing case by adding:

    use re 'debug';