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

Re: Best way to print variables in regex

by Kenosis (Priest)
on Jan 20, 2014 at 23:22 UTC ( #1071393=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    $tags{ uc $1 }++ while $tagged =~ m!<([^/]+?)>!g;
    print "$_: $tags{$_}\n" for sort keys %tags;
    
  2. or download this
    <det>the</det> <jj>quick</jj> <jj>brown</jj> <nn>fox</nn> <vbd>jumped<
    +/vbd> <in>over</in> <det>the</det> <jj>lazy</jj> <nn>dog</nn>
    
    ...
    JJ: 3
    NN: 2
    VBD: 1
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-12-07 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?