Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-06-28 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (349 votes). Check out past polls.