in reply to Upgrade to 5.18 causes uninitialized ${^MATCH}
G'day nbtrap,
Welcome to the monastery.
I'm using 5.18.0. Without any context or knowledge of the values of $buf, $pat, $self or $sub, I am unable to reproduce your problem.
pos() and ${^MATCH} are returning the values I would expect:
$ perl -Mstrict -Mwarnings -E ' my $buf = q{aXa}; while ($buf =~ /a/gp) { say q{pos($buf):}; say pos($buf); say q{${^MATCH}:}; say ${^MATCH}; } ' pos($buf): 1 ${^MATCH}: a pos($buf): 3 ${^MATCH}: a
perldelta (for 5.18.0) mentions a change to ${^MATCH} under Internal Changes which may be relevant.
perldoc.perl.org hasn't updated to 5.18.0 yet. If you're using online documentation, I suggest using the CPAN perl 5.18.0 doco. (The commandline perldoc utility is up-to-date.)
You may get some hints for creating a short, self-contained script that reproduces your problem from "How do I post a question effectively?".
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Upgrade to 5.18 causes uninitialized ${^MATCH}
by nbtrap (Sexton) on May 29, 2013 at 01:54 UTC |