Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: create hashes using regex

by Laurent_R (Monsignor)
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 making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-09-02 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred temperature scale is:










    Results (63 votes), past polls