Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Problem of context?

by biohisham (Priest)
on Oct 16, 2014 at 13:44 UTC ( #1104053=note: print w/replies, xml ) Need Help??


in reply to Re^2: Problem of context?
in thread Problem of context?

Are all the entries in the fifth column of my $mio=$array_with_all_fields[4] unique ?

If the answer is "yes" then your hash can be re-written as has been suggested to you (i.e.  %go_accession_hash{$mio}=' ';). If the answer is "no" then you might want to consider using an advanced data structure that is more appropriate to capture each variation associated with $mio.

In order to help you understand the problem and solution better It will be more useful to actually show a representative example of how your data look like and what you want to achieve from reading it in.


A 4 year old monk

Replies are listed 'Best First'.
Re^4: Problem of context?
by pabla23 (Novice) on Oct 16, 2014 at 15:30 UTC
    Thanks so so so much for your help! The situation is complicated and i'm new in "Perl"! Then: if i print "array_with_all_fields4" this is my output:

    GO:0000060 GO:0000122 GO:0000979 GO:0001077 GO:0001701 GO:0001756 GO:0001836 GO:0002309 .....

    After i store this output into "mio" for a particular need. After i store "mio" into an hash table as the keys of the hash table. If i print the hash table this is the output:

    $VAR1 = 'GO:0000060'; $VAR2 = ''; $VAR1 = 'GO:0000122'; $VAR2 = ''; $VAR1 = 'GO:0000979'; $VAR2 = ''; $VAR1 = 'GO:0001077'; $VAR2 = ''; $VAR1 = 'GO:0001701'; $VAR2 = ''; .....

    the final step for me is to store keys into an array "test2" and after use this array in another "while" and in another "FILE2".

    I know that is so difficult to explain but if you want i can write to you from my personal mail!

    Thaks a lot Paola

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2020-05-29 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (170 votes). Check out past polls.

    Notices?