Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: create hashes using regex

by Laurent_R (Parson)
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. ;-)


Comment on Re: create hashes using regex
Download Code

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 musing on the Monastery: (7)
As of 2014-12-23 01:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (133 votes), past polls