Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Returning regexp pattern that was used to match

by Ven'Tatsu (Deacon)
on May 03, 2004 at 14:58 UTC ( #350032=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    our $matched_key; #global to hold the key that matched, off the top of
    + my head I don't think a 'my' variable would work.
    for (keys($$args)) {
        $string .= "$_(?{$matched_key = $_})|";
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://350032]
help
Chatterbox?
[Discipulus]: ;=) can be an idea for another killing oneliner..
Eily used google. The lazy internet equivalent of grep
[karlgoethebier]: He!

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2017-07-21 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (320 votes). Check out past polls.