Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-06-26 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (587 votes). Check out past polls.