go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I used this little piece of code grabbed in my bigger script as a subroutine.
I had a has in my script connecting bunch of identification numbers with sequences. When I wanted to grab a sequence by a ID and run it through the sub.Lets say ..
Then what I got was a printout of reverse complements for EVERY single sequence in %hashofseqs. (Printout that shows that subroutine is ran on all "value" strings contained in hash) For print command or other such manipulations $stringforsequence is exactly what I would expect from it, a single sequence that corresponds to a certain someIDnr key. How come that this string somehow passes the whole of the hash into the subroutine? How could this be avoided? It is my first script actually containing some hashes. I try to learn a bit about them as they seem to be rahter useful elements for many a data manipulation. But as for now I'm rather dumbfounded. In reply to Why does this sub grab the whole hash by naturalsciences
|
|