Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Upgrade to 5.18 causes uninitialized ${^MATCH}

by kcott (Archbishop)
on May 28, 2013 at 03:00 UTC ( [id://1035508]=note: print w/replies, xml ) Need Help??


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

    Thank you. I'm aware of the changes documented in the 5.18 manual pages, but none of them seemed to address this problem. And I know a working script would have been very helpful, but I couldn't get this to work outside the context of my rather large program, so I decided to cross my fingers and hope someone else might be experiencing the same thing.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1035508]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-18 22:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found