Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: ${^MATCH} regex special variable(s) and /p regex modifier

by lidden (Curate)
on Oct 04, 2011 at 14:16 UTC ( #929556=note: print w/replies, xml ) Need Help??


in reply to Re^3: ${^MATCH} regex special variable(s) and /p regex modifier
in thread ${^MATCH} regex special variable(s) and /p regex modifier

Yes, but it seems anything but a literal string will make the variable defined.
$ perl -wE 'my $s = "foo 123"; $s =~ /\d+/; say ${^PREMATCH}' foo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929556]
help
Chatterbox?
and not a whimper to be heard...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-01-22 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (188 votes). Check out past polls.