Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: create hashes using regex

by Laurent_R (Abbot)
on Jun 12, 2013 at 17:49 UTC ( #1038529=note: print w/replies, xml ) Need Help??


in reply to create hashes using regex

A quick try under the Perl debugger:

DB<1> $c = "TCONS_00000047 XLOC_000039"; DB<2> %h = map { $1, $2 if /(TCONS_00[0-9]+) (XLOC_[0-9]+)/; } ($c); DB<3> x %h 0 'TCONS_00000047' 1 'XLOC_000039'

EDIT: HDB typed faster than me. ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-08-31 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (426 votes). Check out past polls.