Please post your code in <code>...</code> tags so it renders and downloads nicely!
You haven't shown us your input data, so it is hard to tell what your program is doing and where it goes wrong. You also don't show the output, nor do you show what you expect. My guess is that in the place where you assign your object, you are either assigning it always with the same key, or you are assigning always the same object.
You never check whether $module has a sensible value. You may want to check that by modifying your regular expression to
if (/^\s*module\s+(\w+)/) { $module = $1; print "Found module '$module'\n"; }
Print out $module and Dumper $cells to see what $module is before and after assigning a new cell.
Data::Dumper is a great tool to inspect your data structures.
In reply to Re: assigning objects into hash
by Corion
in thread assigning objects into hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |