|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
Hi,
I don't think your $cvterm_id holds what you think it does at all. $cvterm_id is a scalar with no content at the beginning. You get a $hashref from somewhere. "$$hashref{cvterm_id}" is extracting the item called 'cvterm_id' from a hash called whatever is in $hashref. Eg. if $hashref = 'fred' then it's looking at element 'cvterm_id' in %fred. I'm not sure thats what you want. Likewise the result is being written into a hash with no name (as $cvterm_id is undefined, no idea what that actually does..), in the element called $fred{termname}
If $cvterm_id is going to be a hash reference, you need to use it like this: If $hashref is also a real hash reference and not just the name of a hash, then you need this: Then the second package should work.
Try looking at the contents of $cvterm_id in the second package after the while loop, using Data::Dumper for instance. (use Data::Dumper; print Dumper($cvterm_id);) In reply to Re: Hash references moving between modules
by castaway
|
|