Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: hash with both values and keys unique to each other

by hbm (Hermit)
on Jul 12, 2012 at 19:38 UTC ( #981480=note: print w/ replies, xml ) Need Help??


in reply to Re^3: hash with both values and keys unique to each other
in thread hash with both values and keys unique to each other

As a side note, you can clean up that regex quite a bit by using + instead of {1,}, and not escaping colons, semi-colons, and equals:

#if($line=~/^(Gm\d{1,})\trecent_duplication\tsyntenic_region\t(\d{1 +,})\t(\d{1,})\t.*\tID\=\w{1,}_Gm\d{1,}\.(Gm\d{1,}.*)\;median_Ks=(.*)\ +;matches\=(Gm\d{1,}\:\d{1,}\.\.\d{1,})/) if($line=~/^(Gm\d+)\trecent_duplication\tsyntenic_region\t(\d+)\t(\ +d+)\t.*\tID=\w+_Gm\d+\.(Gm\d+.*);median_Ks=(.*);matches=(Gm\d+:\d+\.\ +.\d+)/)


Comment on Re^4: hash with both values and keys unique to each other
Select or Download Code
Re^5: hash with both values and keys unique to each other
by Anonymous Monk on Jul 12, 2012 at 22:18 UTC

    You could clean it up quite a bit more by splitting the line on tabs and parsing each of the columns individually...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-07-11 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (235 votes), past polls