Hi
Hmm splain has heard of the error (its in perldiag)
$ cat 2 Can't coerce UNKNOWN to string in substitution iterator at ./coerce.pl + line 11, <> line 12. $ splain 2 Can't coerce UNKNOWN to string in substitution iterator at ./coerce.pl + line 11, <> line 12 (#1) (F) Certain types of SVs, in particular real symbol table entries (typeglobs), can't be forced to stop being what they are. So you +can't say things like: *foo += 1; You CAN say $foo = *foo; $foo += 1; but then $foo no longer contains a glob.
I can't replicate the error in v5.16.1 but I can in v5.18.2
The output starts to differ at line 59 , so I modify the input to just the part that makes error
5 1 3 8 14 19 26 33
Adding use re 'debug'; makes it run to completion , but output is not identical
Now looking at the regex, and checking perlre,
I see you're using (??{}) , but the return value (a regex pattern) is either X or nothing ... and there is no X in the input,
so I switch to using (?{}) where return value isn't a regex pattern, and with this change both versions of perl produce the same output
Now its not the same output as before with (??{}) but I dont think thats important
In reply to Re: Can't coerce UNKNOWN to string in substitution iterator (splain, (??{}))
by beech
in thread Can't coerce UNKNOWN to string in substitution iterator
by rsFalse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |