in reply to Is your Perl broken? Bug help needed.

I don't fathom the error, but ht(his)h... Happy hunting.

the perl info

C:\>perl -v This is perl, v5.6.1 built for MSWin32-x86-multi-threa (with 1 registered patch, see perl -V for more detail)

the program

while ("this_is_broken_" =~ /(.*?)_/gs) { print "($1) "; }

the output

^C C:\>perl -mre=debug trash.pl Freeing REx: `,' Compiling REx `(.*?)_' size 10 first at 5 1: OPEN1(3) 3: MINMOD(4) 4: STAR(6) 5: SANY(0) 6: CLOSE1(8) 8: EXACT <_>(10) 10: END(0) floating `_' at 0..2147483647 (checking floating) anchored(SBOL) impli +cit minlen 1 Guessing start of match, REx `(.*?)_' against `this_is_broken_'... Found floating substr `_' at offset 4... Guessed: match at offset 0 Matching REx `(.*?)_' against `this_is_broken_' Setting an EVAL scope, savestack=9 0 <> <this_is_brok> | 1: OPEN1 0 <> <this_is_brok> | 3: MINMOD 0 <> <this_is_brok> | 4: STAR Setting an EVAL scope, savestack=9 0 <> <this_is_brok> | 6: CLOSE1 0 <> <this_is_brok> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 1 <t> <his_is_brok> | 6: CLOSE1 1 <t> <his_is_brok> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 2 <th> <is_is_brok> | 6: CLOSE1 2 <th> <is_is_brok> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 3 <thi> <s_is_brok> | 6: CLOSE1 3 <thi> <s_is_brok> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 4 <this> <_is_brok> | 6: CLOSE1 4 <this> <_is_brok> | 8: EXACT <_> 5 <this_> <is_brok> | 10: END Match successful! (this) Guessing start of match, REx `(.*?)_' against `is_broken_'... Found floating substr `_' at offset 2... Guessed: match at offset 0 Matching REx `(.*?)_' against `is_broken_' Setting an EVAL scope, savestack=9 5 <this_> <is_brok> | 1: OPEN1 5 <this_> <is_brok> | 3: MINMOD 5 <this_> <is_brok> | 4: STAR Setting an EVAL scope, savestack=9 5 <this_> <is_brok> | 6: CLOSE1 5 <this_> <is_brok> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 6 <his_i> <s_broke> | 6: CLOSE1 6 <his_i> <s_broke> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 7 <is_is> <_broken> | 6: CLOSE1 7 <is_is> <_broken> | 8: EXACT <_> 8 <s_is_> <broken_> | 10: END Match successful! (is) Guessing start of match, REx `(.*?)_' against `broken_'... Found floating substr `_' at offset 6... Guessed: match at offset 0 Matching REx `(.*?)_' against `broken_' Setting an EVAL scope, savestack=9 8 <s_is_> <broken_> | 1: OPEN1 8 <s_is_> <broken_> | 3: MINMOD 8 <s_is_> <broken_> | 4: STAR Setting an EVAL scope, savestack=9 8 <s_is_> <broken_> | 6: CLOSE1 8 <s_is_> <broken_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 9 <s_is_b> <roken_> | 6: CLOSE1 9 <s_is_b> <roken_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 10 <s_is_br> <oken_> | 6: CLOSE1 10 <s_is_br> <oken_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 11 <s_is_bro> <ken_> | 6: CLOSE1 11 <s_is_bro> <ken_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 12 <s_is_brok> <en_> | 6: CLOSE1 12 <s_is_brok> <en_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 13 <s_is_broke> <n_> | 6: CLOSE1 13 <s_is_broke> <n_> | 8: EXACT <_> failed... SANY can match 1 times out of 1... 14 <s_is_broken> <_> | 6: CLOSE1 14 <s_is_broken> <_> | 8: EXACT <_> 15 <s_is_broken_> <> | 10: END Match successful! (broken) Freeing REx: `(.*?)_'

Replies are listed 'Best First'.
Re: Re: Is your Perl broken? Bug help needed.
by YAPHY (Initiate) on Jan 10, 2002 at 01:30 UTC
    Hey, I'm the poor sod using Woody that first got bit by this problem.

    My results are, in a nutshell, that all of my Perl 5.6.1's have this error (3 different boxes) but my Perl 5.005 does not. And it is an error, correct? There is no way this could be anything but a bug?

    I don't have Perl 5.6.0 installed anywhere. If anybody does, I'm curious to know if you have the error.

      Perl 5.6.0 on RH 7.1 doesn't display the error... i.e.
      % perl -le 'print "($1) " while "this_is_broken_" =~ /(.*?)_/gs' (this) (is) (broken) % perl -v This is perl, v5.6.0 built for i386-linux

      -Blake